Closed SeptemberMaples closed 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" ] }) }]
Should be fixed less-loader@latest
less-loader@latest
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" ] }) }]