mercredi 29 août 2018

webpack-dev-server cannot get /?

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.

git bash

git bash result

browser console

browser console




Aucun commentaire:

Enregistrer un commentaire