Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
feat(webpac_config/client/prod): remove comments from css files
Browse files Browse the repository at this point in the history
  • Loading branch information
Metnew committed Aug 5, 2017
1 parent fef60c3 commit a724beb
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions webpack_config/client/webpack.prod.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ base.plugins.push(
filename: '[name].[chunkhash:8].css',
allChunks: true
}),
new OptimizeCssAssetsPlugin(),
new OptimizeCssAssetsPlugin({
cssProcessorOptions: {
safe: true,
discardComments: {
removeAll: true
}
}
}),
// NOTE: ModuleConcatenationPlugin doesn't work on linux alpine,
// I got an error trying to deploy this app to zeit's `now` when i use this plugin
// new webpack.optimize.ModuleConcatenationPlugin(),
Expand Down Expand Up @@ -114,17 +121,15 @@ base.plugins.push(
name: 'manifest'
}),
new webpack.BannerPlugin({
banner:
'React-Semantic.UI-Starter. MIT License. Copyright (c) 2017 Copyright Vladimir Metnew. All Rights Reserved. https://github.com/Metnew/react-semantic.ui-starter'
banner: config.banner
}),
// XXX: this plugin seems cool, but there are few big issues:
// XXX: this plugin looks cool, but there are few big issues:
// 1. It sets invalid url to browserconfig.xml and manifest.json in index.html.
// E.g: in generated index.html you can see:
// <meta name="msapplication-config" content="browserconfig.xml">
// 2. It looks like generated images aren't minified.(not sure)
// 3. plugin is deprecated (at least look like it's deprecated)!
// NOTE: It would be better to generate favicons without this plugin.
//
//
new FaviconsWebpackPlugin({
// add theme-color property
background: config.manifest.theme,
Expand Down

0 comments on commit a724beb

Please sign in to comment.