Package.json has scripts:
"build": "webpack-dev-server" ,
"build_p": "webpack-dev-server -p "
So npm run build - it is normal:
and with npm run build_p - an error saying something scary about UglifyJs:
Here is the contents of package.json :
{ "name": "test123", "version": "1.0.0", "description": "webpack123", "main": "app.js", "scripts": { "start": "webpack-dev-server --entry ./src/js/app.js --output-filename ./dist/bundle.js", "build": "webpack-dev-server", "build_p": "webpack-dev-server -p" }, "author": "", "license": "ISC", "dependencies": { "jquery": "^3.2.1", "webpack": "^3.9.0" }, "devDependencies": { "babel": "^6.23.0", "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-minify-webpack-plugin": "^0.2.0", "babel-preset-es2015": "^6.24.1", "css-loader": "^0.28.7", "style-loader": "^0.19.0", "webpack-dev-server": "^2.9.5" } } webpack.config.js content:
const webpack = require("webpack"); const MinifyPlugin = require("babel-minify-webpack-plugin"); module.exports = { entry: "./src/js/app.js", output: { path: __dirname + "/dist", filename: "bundle.js" }, watch: true, module: { loaders: [ {test: /\.css$/, loader: "style-loader!css-loader"}, {test: /\.js$/, loader: "babel-loader", exclude: /node_modules/, query: {presets: ["es2015"]}} ] }, plugins: [ new MinifyPlugin({ // ... }) ] }; Perhaps this is somehow related to the Babel Minify plugin, but I do not really understand how.
Who will say what?


query, but theoptions, the babel preset does not work for you. - Igor Golovin