Open devkral opened 3 years ago
there is a much nicer way:
module.exports = (env, options) =>({
...
devServer: {
port: '8080',
devMiddleware: {
writeToDisk: true,
},
headers: {
'Access-Control-Allow-Origin': '*'
},
},
plugins: [
new WebpackManifestPlugin({
writeToFileEmit: true,
}),
],
output: {
...
# replaces clean plugin
clean: true
}
}),
For debugging it is better to have webpack-dev-server active. Sadly it is a bit tricky to configure: webpack.config.js
it would be nice to include this trick in the documentation
My project uses this setup: https://github.com/devkral/secretgraph