Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR in Loader /mantraproject/node_modules/css/index.js didn't return a function #214

Closed
ickyrr opened this issue May 25, 2016 · 3 comments

Comments

@ickyrr
Copy link

ickyrr commented May 25, 2016

Need help with loading less file, still new to mantra and having a very difficult time with this. I installed the following modules:

less
less-loader
style-loader
raw-loader

I followed the the webpack's instructions here but could not get it to work.

ERROR in Loader /mantraproject/node_modules/css/index.js didn't return a function
 @ ./client/assets/stylesheets/style.less 4:14-174 13:2-17:4 14:20-180
@mindjuice
Copy link

Not sure if you're asking for mantra or storybook, but my webpack.config.js for storybook handles .less files (and images and fonts):

const path = require('path');

module.exports = {
  module: {
    loaders: [
      {
        test: /\.less?$/,
        loaders: [ 'style', 'css', 'less' ],
        include: path.resolve(__dirname, '../')
      }, {
        test: /\.(jpg|png)$/,
        loader: 'url?limit=25000',
        include: path.resolve(__dirname, '../stories/')
      }, {
        // Fonts
        test: /\.(woff|woff2|ttf|eot|svg)$/,
        loader: 'file',
        query: { name: 'fonts/[name].[ext]' },
      }
    ]
  }
}

@ickyrr
Copy link
Author

ickyrr commented May 26, 2016

@mindjuice - did you install other loaders?

@ndelangen
Copy link
Member

Please re-open if you are still experiencing this issue 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants