webpack-contrib / less-loader

Compiles Less to CSS
MIT License
959 stars 194 forks source link

Module '/node_modules/less/index.js' is not a loader #199

Closed SeptemberMaples closed 7 years ago

SeptemberMaples commented 7 years ago

I'm trying to upgrade webpack1.x to webpack2.x. and find this question like below.

Error: Module '/Users/ziseyiliao/projects/node_modules/less/index.js' is not a loader (must have normal or pitch function)

webpack.config.js

rules: [ { test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ }, { test: /\.less$/, use: ExtractTextPlugin.extract({ fallback: 'style-loader', use:[ "css-loader", "autoprefixer-loader", "less-loader" ] }) }]

michael-ciniawsky commented 7 years ago

Should be fixed less-loader@latest