getting crazy with this, really missing something....
I have webpack 4.6.0, webpack-cli ^2.1.2, so the latest.
Following the docs (https://webpack.js.org/concepts/mode/), want to use the mode to have to configs, one for production and one for development, but I get:
configuration[0] has an unknown property 'mode'. These properties are valid: object { amd?, bail?, cache?, context?, dependencies?, devServer?, devtool?, entry, externals?, loader?, module?, name?, node?, output?, parallelism?, performance?, plugins?, profile?, recordsInputPath?, recordsOutputPath?, recordsPath?, resolve?, resolveLoader?, stats?, target?, watch?, watchOptions? }
What am I missing :O?????
module.exports = [
merge(base, {
mode: 'development',
output: {
path: path.resolve(__dirname, './public/assets/development'),
},
}),
merge(base, {
mode: 'production',
output: {
path: path.resolve(__dirname, './public/assets/production'),
filename: '[name].bundle.js',
},
}),
]