Skip to content

Commit 7488602

Browse files
author
hzsrc
committed
2 parents 0f61498 + 41d1e23 commit 7488602

File tree

17 files changed

+8593
-7832
lines changed

17 files changed

+8593
-7832
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[Makefile]
12+
indent_style = tab
13+
14+
[*.md]
15+
indent_size = 4
16+
trim_trailing_whitespace = false

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v8.9.4
1+
v14.9.0

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
A Webpack plugin to optimize \ minimize CSS assets.
44

5+
> :warning: For webpack v5 or above please use [css-minimizer-webpack-plugin](https://github.com/webpack-contrib/css-minimizer-webpack-plugin) instead.
6+
57
## What does the plugin do?
68

79
It will search for CSS assets during the Webpack build and will optimize \ minimize the CSS (by default it uses [cssnano](http://github.com/ben-eb/cssnano) but a custom CSS processor can be specified).
@@ -58,3 +60,4 @@ module.exports = {
5860
## License
5961

6062
MIT (http://www.opensource.org/licenses/mit-license.php)
63+

package-lock.json

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

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "optimize-css-assets-webpack-plugin",
3-
"version": "5.0.2",
3+
"version": "5.0.3",
44
"description": "A Webpack plugin to optimize \\ minimize CSS assets, with sorce map file name support",
55
"keywords": [
66
"CSS",
@@ -25,20 +25,20 @@
2525
]
2626
},
2727
"dependencies": {
28-
"cssnano": "^4.1.0",
28+
"cssnano": "^4.1.10",
2929
"last-call-webpack-plugin": "^3.0.0"
3030
},
3131
"devDependencies": {
32-
"babel-core": "^6.26.0",
33-
"babel-jest": "^22.1.0",
32+
"babel-core": "^6.26.3",
33+
"babel-jest": "^26.3.0",
3434
"babel-plugin-transform-object-rest-spread": "^6.26.0",
3535
"babel-polyfill": "^6.26.0",
36-
"babel-preset-env": "^1.6.1",
37-
"css-loader": "^0.28.9",
36+
"babel-preset-env": "^1.7.0",
37+
"css-loader": "^3.6.0",
3838
"extract-text-webpack-plugin": "next",
39-
"jest": "^22.1.4",
39+
"jest": "^26.4.2",
4040
"style-loader": "^0.20.1",
41-
"webpack": "^4.9.1"
41+
"webpack": "^4.44.1"
4242
},
4343
"peerDependencies": {
4444
"webpack": "^4.0.0"

test/__snapshots__/webpack-integration.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ p {
1717
"
1818
`;
1919

20-
exports[`Webpack Integration Tests only-assetNameRegExp-processed 2`] = `"a{color:#00f}body{color:red;margin:0}p{margin:1000px}"`;
20+
exports[`Webpack Integration Tests only-assetNameRegExp-processed 2`] = `"a{color:#00f}body{margin:0;color:red}p{margin:1000px}"`;
2121

2222
exports[`Webpack Integration Tests removes-duplicate-css 1`] = `"a{color:#00f}body{color:red}p{color:green}"`;
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
body {
2-
color: red;
3-
}
4-
a {
5-
color: blue;
6-
}
1+
body{color:red}a{color:blue}
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
body {
2-
margin: 0;
3-
color: red;
4-
}
5-
p {
6-
margin: 1000px;
7-
}
1+
body{margin:0;color:red}p{margin:1000px}
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
body {
2-
color: red;
3-
padding: 0;
4-
margin: 0;
5-
}
6-
p {
7-
padding: 500px;
8-
padding: 1000px;
9-
}
1+
body{color:red;padding:0;margin:0}p{padding:500px;padding:1000px}

test/cases/assetNameRegExp-no-source/webpack.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ module.exports = {
1010
use: ExtractTextPlugin.extract({
1111
fallback: { loader: 'style-loader' },
1212
use: {
13-
loader: 'css-loader',
14-
options: { minimize: true }
13+
loader: 'css-loader'
1514
}
1615
})
1716
},

0 commit comments

Comments
 (0)