Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epic/massive update #52

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions example/webpack.config.babel.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import webpack from 'webpack';
import path from 'path';
import ExtractTextWebpackPlugin from 'extract-text-webpack-plugin';
import CleanWebpackPlugin from 'clean-webpack-plugin';
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
import UglifyJsPlugin from 'uglifyjs-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import pkg from '../package.json';

Expand Down Expand Up @@ -92,7 +93,8 @@ const webpackConfig = {
]
},
plugins: [
new CleanWebpackPlugin([DEST_DIR], {
new CleanWebpackPlugin({
cleanAfterEveryBuildPatterns: [DEST_DIR],
verbose: false
}),
new webpack.DefinePlugin({
Expand Down Expand Up @@ -138,13 +140,9 @@ if (!HOT) {
}

if (PROD) {
webpackConfig.plugins = webpackConfig.plugins.concat([
new webpack.optimize.UglifyJsPlugin({
output: {
comments: false
}
})
]);
webpackConfig.optimization = {
minimizer: [new UglifyJsPlugin()],
};
}

export default webpackConfig;
Loading