This is my webpack.config.js
devserver:
devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
port: 9000
},
output:
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'js/[name].min.js',
},
package.json
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "webpack --watch",
"start": "webpack-dev-server --open",
"build": "webpack --env.production"
}
the browser always cannot get / when I ran npm start.
Aucun commentaire:
Enregistrer un commentaire