You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue with the webpack.config.js when using sass-loader. The following error occurs when trying to run locally
$ webpack-dev-server -d --progress --colors --inline --hot --https --open --content-base bin/
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration has an unknown property 'sassLoader'. These properties are valid:
object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
For typos: please correct them.
For loader options: webpack 2 no longer allows custom properties in configuration.
Loaders should be updated to allow passing options via loader options in module.rules.
Until loaders are updated one can use the LoaderOptionsPlugin to pass these options to the loader:
plugins: [
new webpack.LoaderOptionsPlugin({
// test: /\.xxx$/, // may apply this only for some modules
options: {
sassLoader: ...
}
})
]
error Command failed with exit code 1.
The text was updated successfully, but these errors were encountered:
To explain what happened, you have webpack-dev-server installed globally, which is webpack-dev-server version 2, compatible with webpack2, which has a different structure for configuration objects, and the options were made invalid due to the command searching in the node_modules folder for a webpack-dev-server launcher, which it failed to do, and then fell back to your global version.
There is an issue with the webpack.config.js when using sass-loader. The following error occurs when trying to run locally
The text was updated successfully, but these errors were encountered: