Upon starting the server with npm run start
, I encountered the following error message:
✖ 「wds」: Invalid configuration object. Webpack has been initialized using a configuration object that does not comply with the API schema.
- Configuration contains an unknown property 'debug'. Valid properties include:
object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry?, externals?, infrastructureLogging?, loader?, mode?, module?, name?, node?, optimization?, output?, parallelism?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, serve?, stats?, target?, watch?, watchOptions? }
The 'debug' property was deprecated in webpack version 2.0.0.
Loaders must be updated to allow passing this option via loader options in module.rules.
Until loaders are updated, you can use the LoaderOptionsPlugin to enable debug mode:
plugins: [
new webpack.LoaderOptionsPlugin({
debug: true
})
]
- configuration.module contains an unknown property 'loaders'. Valid properties include:
object { defaultRules?, exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, strictExportPresence?, strictThisContextOnImports?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp? }
-> Options impacting normal modules (`NormalModuleFactory`).
This is my current webpack.config.js file:
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: [
'./src/Main.js'
],
output: { path: __dirname, filename: 'bundle.js' },
cache: true,
debug: true,
devtool: 'source-map',
module: {
loaders: [
{
test: /\.glsl$/,
loader: 'webpack-glsl',
include: [
path.resolve(__dirname, 'src', 'shaders')
]
}
]
},
devServer: {
compress: true,
disableHostCheck: true,
},
plugins: [
new webpack.LoaderOptionsPlugin({
debug: true
})
]
};