Hello,
The current dfx new command generate a project that use webpack-dev-server version 3.
It would be nice if an update was made by default.
In the meantime I share my modifications to move to version 4:
webpack.config.js update devServer if you update in package.json the webpack-dev-server to version 4
devServer: {
proxy: {
"/api": {
target: "http://localhost:8000",
changeOrigin: true,
pathRewrite: {
"^/api": "/api",
},
},
},
static: {
directory: path.resolve(__dirname, "static"),
staticOptions: {},
publicPath: "./src/dfinity_reactJs_reactRouter_babel_assets",
serveIndex: true,
watch: true,
},
// Upgrade according https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md
//hot: true,
//contentBase: path.resolve(__dirname, "./src/dfinity_reactJs_reactRouter_babel_assets"),
//watchContentBase: true
},