Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Commit 3c847ee

Browse files
committed
Add optimize-css-assets plugin
1 parent bd0b81f commit 3c847ee

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

‎package-lock.json

Lines changed: 20 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
"history": "^4.7.2",
4444
"html-webpack-plugin": "^2.28.0",
4545
"jest": "^22.4.3",
46+
"optimize-css-assets-webpack-plugin": "^3.2.0",
4647
"postcss": "^6.0.21",
4748
"postcss-loader": "^2.1.4",
4849
"prop-types": "^15.6.1",
4950
"purgecss-webpack-plugin": "^0.22.0",
50-
"react-mock-router": "^1.0.15",
5151
"react-test-renderer": "^16.3.2",
5252
"redux-mock-store": "^1.5.1",
5353
"style-loader": "^0.19.0",

‎webpack.build.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
44
const ExtractTextPlugin = require('extract-text-webpack-plugin');
55
const PurgecssPlugin = require('purgecss-webpack-plugin');
66
const NodeExternals = require('webpack-node-externals');
7+
const OptimizeCssPlugin = require('optimize-css-assets-webpack-plugin');
78
const glob = require('glob-all');
89
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
910

@@ -81,6 +82,9 @@ module.exports = {
8182
comments: false
8283
}
8384
}),
85+
new OptimizeCssPlugin({
86+
cssProcessorOptions: { discardComments: { removeAll: true } }
87+
}),
8488
new PurgecssPlugin({
8589
paths: glob.sync([
8690
SRC_DIR + '/index.html',

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /