Skip to content

Commit

Permalink
Favor webpack -p flag over babel minify plugin
Browse files Browse the repository at this point in the history
The babel-minify-webpack-plugin was giving me a strange error when
building. The Webpack builtin production minifier f does not seem have
this issue.

webpack/webpack-sources#28
  • Loading branch information
gluxon committed Feb 19, 2018
1 parent 0575989 commit 255c0da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
"private": true,
"scripts": {
"test": "webpack-dev-server --config webpack.dev.js",
"build": "webpack --config webpack.prod.js",
"build": "webpack --config webpack.prod.js -p",
"clean": "rm logs/*; rm -rf dist/",
"start": "forever start -a -l webhook.log server.js",
"stop": "forever stop server.js"
},
"devDependencies": {
"autoprefixer": "^7.1.6",
"babel-loader": "^7.1.2",
"babel-minify-webpack-plugin": "^0.2.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
Expand Down
7 changes: 1 addition & 6 deletions webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const webpack = require("webpack");
const merge = require("webpack-merge");
const common = require("./webpack.common.js");
const MinifyPlugin = require("babel-minify-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");

module.exports = merge(common, {
Expand All @@ -12,13 +11,9 @@ module.exports = merge(common, {
NODE_ENV: '"production"' // Why double quotes? https://github.com/thgh/vuejs-templates-rollup/issues/1#issuecomment-255096585
}
}),
new MinifyPlugin({},
{
comments: false
}),
new HtmlWebpackPlugin({
template: "src/images/favicon/favicon.ico",
filename: "favicon.ico"
})
]
});
});

0 comments on commit 255c0da

Please sign in to comment.