diff --git a/README.md b/README.md index 27d884b..b991214 100644 --- a/README.md +++ b/README.md @@ -44,13 +44,17 @@ module.exports = { }, optimization: { minimize: true, - minimizer: [new CssMinimizerPlugin()], + minimizer: [ + // For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line + // `...` + new CssMinimizerPlugin(), + ], }, }; ``` This will enable CSS optimization only in production mode. -If you want to run it also in development, put the plugin configuration in the `plugins` option array. +If you want to run it also in development set the `optimization.minimize` option to `true`. And run `webpack` via your preferred method. diff --git a/package-lock.json b/package-lock.json index b82edd0..857b2ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -98,12 +98,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -1123,12 +1123,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -1624,12 +1624,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "globals": { @@ -2446,9 +2446,9 @@ "dev": true }, "@types/node": { - "version": "14.10.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.10.1.tgz", - "integrity": "sha512-aYNbO+FZ/3KGeQCEkNhHFRIzBOUgc7QvcVNKXbfnhDkSfwUv91JsQQa10rDgKSTSLkXZ1UIyPe4FJJNVgw1xWQ==" + "version": "14.11.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.1.tgz", + "integrity": "sha512-oTQgnd0hblfLsJ6BvJzzSL+Inogp3lq9fGgqRkMB/ziKMgEUaFl801OncOzUmalfzt14N0oPHMK47ipl+wbTIw==" }, "@types/normalize-package-data": { "version": "2.4.0", @@ -3546,13 +3546,13 @@ } }, "browserslist": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.2.tgz", - "integrity": "sha512-HI4lPveGKUR0x2StIz+2FXfDk9SfVMrxn6PLh1JeGUwcuoDkdKZebWiyLRJ68iIPDpMI4JLVDf7S7XzslgWOhw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.3.tgz", + "integrity": "sha512-GcZPC5+YqyPO4SFnz48/B0YaCwS47Q9iPChRGi6t7HhflKBcINzFrJvRfC+jp30sRMKxF+d4EHGs27Z0XP1NaQ==", "requires": { - "caniuse-lite": "^1.0.30001125", - "electron-to-chromium": "^1.3.564", - "escalade": "^3.0.2", + "caniuse-lite": "^1.0.30001131", + "electron-to-chromium": "^1.3.570", + "escalade": "^3.1.0", "node-releases": "^1.1.61" } }, @@ -3685,9 +3685,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001131", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001131.tgz", - "integrity": "sha512-4QYi6Mal4MMfQMSqGIRPGbKIbZygeN83QsWq1ixpUwvtfgAZot5BrCKzGygvZaV+CnELdTwD0S4cqUNozq7/Cw==" + "version": "1.0.30001132", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001132.tgz", + "integrity": "sha512-zk5FXbnsmHa0Ktc/NOZJRr+ilXva+2KFJuRiQfnjkxJfV/7DYP5C27lSQF++/veCUzVWE5xecZnSBJjf6fSwJA==" }, "capture-exit": { "version": "2.0.0", @@ -4756,9 +4756,9 @@ "dev": true }, "copy-webpack-plugin": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-6.1.0.tgz", - "integrity": "sha512-aWjIuLt1OVQxaDVffnt3bnGmLA8zGgAJaFwPA+a+QYVPh1vhIKjVfh3SbOFLV0kRPvGBITbw17n5CsmiBS4LQQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-6.1.1.tgz", + "integrity": "sha512-4TlkHFYkrZ3WppLA5XkPmBLI5lnEpFsXvpeqxCf5PzkratZiVklNXsvoQkLhUU43q7ZL3AOXtaHAd9jLNJoU0w==", "dev": true, "requires": { "cacache": "^15.0.5", @@ -4770,7 +4770,7 @@ "normalize-path": "^3.0.0", "p-limit": "^3.0.2", "schema-utils": "^2.7.1", - "serialize-javascript": "^4.0.0", + "serialize-javascript": "^5.0.1", "webpack-sources": "^1.4.3" }, "dependencies": { @@ -4793,15 +4793,6 @@ "emojis-list": "^3.0.0", "json5": "^2.1.2" } - }, - "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } } } }, @@ -5698,9 +5689,9 @@ } }, "electron-to-chromium": { - "version": "1.3.568", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.568.tgz", - "integrity": "sha512-j9MlEwgTHVW/lq93Hw8yhzA886oLjDm3Hz7eDkWP2v4fzLVuqOWhpNluziSnmR/tBqgoYldagbLknrdg+B7Tlw==" + "version": "1.3.570", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.570.tgz", + "integrity": "sha512-Y6OCoVQgFQBP5py6A/06+yWxUZHDlNr/gNDGatjH8AZqXl8X0tE4LfjLJsXGz/JmWJz8a6K7bR1k+QzZ+k//fg==" }, "elliptic": { "version": "6.5.3", @@ -5990,12 +5981,12 @@ } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "glob-parent": { @@ -8360,12 +8351,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -10029,9 +10020,9 @@ "dev": true }, "klona": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.3.tgz", - "integrity": "sha512-CgPOT3ZadDpXxKcfV56lEQ9OQSZ42Mk26gnozI+uN/k39vzD8toUhRQoqsX0m9Q3eMPEfsLWmtyUpK/yqST4yg==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz", + "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==", "dev": true }, "leven": { @@ -10066,9 +10057,9 @@ "dev": true }, "lint-staged": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.3.0.tgz", - "integrity": "sha512-an3VgjHqmJk0TORB/sdQl0CTkRg4E5ybYCXTTCSJ5h9jFwZbcgKIx5oVma5e7wp/uKt17s1QYFmYqT9MGVosGw==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.4.0.tgz", + "integrity": "sha512-uaiX4U5yERUSiIEQc329vhCTDDwUcSvKdRLsNomkYLRzijk3v8V9GWm2Nz0RMVB87VcuzLvtgy6OsjoH++QHIg==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -10163,12 +10154,12 @@ } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "execa": { @@ -12247,9 +12238,9 @@ "dev": true }, "postcss": { - "version": "7.0.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", - "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==", + "version": "7.0.34", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.34.tgz", + "integrity": "sha512-H/7V2VeNScX9KE83GDrDZNiGT1m2H+UTnlinIzhjlLX9hfMUn1mHNnGeX81a1c8JSBdBvqk7c2ZOG6ZPn5itGw==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -12742,9 +12733,9 @@ "dev": true }, "prettier": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz", - "integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz", + "integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==", "dev": true }, "pretty-format": { @@ -13150,9 +13141,9 @@ "dev": true }, "regexpu-core": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", - "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", "dev": true, "requires": { "regenerate": "^1.4.0", @@ -14061,9 +14052,9 @@ } }, "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz", + "integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==", "dev": true }, "split": { diff --git a/package.json b/package.json index 1e7b87e..3244541 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@webpack-contrib/eslint-config-webpack": "^3.0.0", "babel-jest": "^26.3.0", "clean-css": "^4.2.3", - "copy-webpack-plugin": "^6.1.0", + "copy-webpack-plugin": "^6.1.1", "cross-env": "^7.0.2", "css-loader": "^4.3.0", "csso": "^4.0.3", @@ -72,13 +72,13 @@ "eslint-plugin-import": "^2.22.0", "husky": "^4.3.0", "jest": "^26.4.2", - "lint-staged": "^10.3.0", + "lint-staged": "^10.4.0", "memfs": "^3.2.0", "mini-css-extract-plugin": "^0.11.2", "node-sass": "^4.14.1", "npm-run-all": "^4.1.5", "postcss": "^7.0.32", - "prettier": "^2.1.1", + "prettier": "^2.1.2", "sass-loader": "^10.0.2", "standard-version": "^9.0.0", "webpack": "^4.44.2" diff --git a/test/CssMinimizerPlugin.test.js b/test/CssMinimizerPlugin.test.js index 96ce3c4..ea6c4ae 100644 --- a/test/CssMinimizerPlugin.test.js +++ b/test/CssMinimizerPlugin.test.js @@ -548,8 +548,8 @@ describe('CssMinimizerPlugin', () => { expect(readAssets(compiler, newStats, /\.css$/)).toMatchSnapshot( 'assets' ); - expect(getWarnings(newStats)).toMatchSnapshot('errors'); - expect(getErrors(newStats)).toMatchSnapshot('warnings'); + expect(getWarnings(newStats)).toMatchSnapshot('warnings'); + expect(getErrors(newStats)).toMatchSnapshot('errors'); resolve(); }); @@ -620,8 +620,8 @@ describe('CssMinimizerPlugin', () => { expect(readAssets(compiler, newStats, /\.css$/)).toMatchSnapshot( 'assets' ); - expect(getWarnings(newStats)).toMatchSnapshot('errors'); - expect(getErrors(newStats)).toMatchSnapshot('warnings'); + expect(getWarnings(newStats)).toMatchSnapshot('warnings'); + expect(getErrors(newStats)).toMatchSnapshot('errors'); resolve(); }); @@ -694,8 +694,8 @@ describe('CssMinimizerPlugin', () => { expect(readAssets(compiler, newStats, /\.css$/)).toMatchSnapshot( 'assets' ); - expect(getWarnings(newStats)).toMatchSnapshot('errors'); - expect(getErrors(newStats)).toMatchSnapshot('warnings'); + expect(getWarnings(newStats)).toMatchSnapshot('warnings'); + expect(getErrors(newStats)).toMatchSnapshot('errors'); resolve(); }); @@ -768,8 +768,8 @@ describe('CssMinimizerPlugin', () => { expect(readAssets(compiler, newStats, /\.css(\.map)?$/)).toMatchSnapshot( 'assets' ); - expect(getWarnings(newStats)).toMatchSnapshot('errors'); - expect(getErrors(newStats)).toMatchSnapshot('warnings'); + expect(getWarnings(newStats)).toMatchSnapshot('warnings'); + expect(getErrors(newStats)).toMatchSnapshot('errors'); resolve(); }); @@ -844,8 +844,8 @@ describe('CssMinimizerPlugin', () => { expect(readAssets(compiler, newStats, /\.css(\.map)?$/)).toMatchSnapshot( 'assets' ); - expect(getWarnings(newStats)).toMatchSnapshot('errors'); - expect(getErrors(newStats)).toMatchSnapshot('warnings'); + expect(getWarnings(newStats)).toMatchSnapshot('warnings'); + expect(getErrors(newStats)).toMatchSnapshot('errors'); resolve(); }); @@ -938,8 +938,8 @@ describe('CssMinimizerPlugin', () => { expect(readAssets(compiler, newStats, /\.css$/)).toMatchSnapshot( 'assets' ); - expect(getWarnings(newStats)).toMatchSnapshot('errors'); - expect(getErrors(newStats)).toMatchSnapshot('warnings'); + expect(getWarnings(newStats)).toMatchSnapshot('warnings'); + expect(getErrors(newStats)).toMatchSnapshot('errors'); resolve(); }); @@ -1034,8 +1034,8 @@ describe('CssMinimizerPlugin', () => { expect(readAssets(compiler, newStats, /\.css$/)).toMatchSnapshot( 'assets' ); - expect(getWarnings(newStats)).toMatchSnapshot('errors'); - expect(getErrors(newStats)).toMatchSnapshot('warnings'); + expect(getWarnings(newStats)).toMatchSnapshot('warnings'); + expect(getErrors(newStats)).toMatchSnapshot('errors'); resolve(); }); @@ -1105,8 +1105,8 @@ describe('CssMinimizerPlugin', () => { expect(readAssets(compiler, newStats, /\.css$/)).toMatchSnapshot( 'assets' ); - expect(getWarnings(newStats)).toMatchSnapshot('errors'); - expect(getErrors(newStats)).toMatchSnapshot('warnings'); + expect(getWarnings(newStats)).toMatchSnapshot('warnings'); + expect(getErrors(newStats)).toMatchSnapshot('errors'); resolve(); }); diff --git a/test/__snapshots__/CssMinimizerPlugin.test.js.snap.webpack4 b/test/__snapshots__/CssMinimizerPlugin.test.js.snap.webpack4 index 194924d..2ce35be 100644 --- a/test/__snapshots__/CssMinimizerPlugin.test.js.snap.webpack4 +++ b/test/__snapshots__/CssMinimizerPlugin.test.js.snap.webpack4 @@ -283,7 +283,11 @@ Array [ ] `; -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: errors 2`] = ` +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: errors 2`] = `Array []`; + +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: warnings 1`] = `Array []`; + +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: warnings 2`] = ` Array [ "Css Minimizer Plugin: warning-plugin: Warning from foo.css ", "Css Minimizer Plugin: warning-plugin: Warning from style-2.css ", @@ -291,10 +295,6 @@ Array [ ] `; -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: warnings 1`] = `Array []`; - -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: warnings 2`] = `Array []`; - exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": assets 1`] = ` Object { "foo.css": "body { @@ -331,7 +331,11 @@ Array [ ] `; -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": errors 2`] = ` +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": errors 2`] = `Array []`; + +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": warnings 1`] = `Array []`; + +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": warnings 2`] = ` Array [ "Css Minimizer Plugin: warning-plugin: Warning from foo.css ", "Css Minimizer Plugin: warning-plugin: Warning from style-2.css ", @@ -339,10 +343,6 @@ Array [ ] `; -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": warnings 1`] = `Array []`; - -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": warnings 2`] = `Array []`; - exports[`CssMinimizerPlugin should write stdout and stderr of workers to stdout and stderr of main process in parallel mode: assets 1`] = ` Object { "one.css": ".minify {};", diff --git a/test/__snapshots__/CssMinimizerPlugin.test.js.snap.webpack5 b/test/__snapshots__/CssMinimizerPlugin.test.js.snap.webpack5 index 5adc2d4..b8035b0 100644 --- a/test/__snapshots__/CssMinimizerPlugin.test.js.snap.webpack5 +++ b/test/__snapshots__/CssMinimizerPlugin.test.js.snap.webpack5 @@ -293,7 +293,11 @@ Array [ ] `; -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: errors 2`] = ` +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: errors 2`] = `Array []`; + +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: warnings 1`] = `Array []`; + +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: warnings 2`] = ` Array [ "Css Minimizer Plugin: warning-plugin: Warning from foo.css ", "Css Minimizer Plugin: warning-plugin: Warning from style-2.css ", @@ -301,10 +305,6 @@ Array [ ] `; -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: warnings 1`] = `Array []`; - -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true" and the asset has been changed: warnings 2`] = `Array []`; - exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": assets 1`] = ` Object { "foo.css": "body { @@ -341,7 +341,11 @@ Array [ ] `; -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": errors 2`] = ` +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": errors 2`] = `Array []`; + +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": warnings 1`] = `Array []`; + +exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": warnings 2`] = ` Array [ "Css Minimizer Plugin: warning-plugin: Warning from foo.css ", "Css Minimizer Plugin: warning-plugin: Warning from style-2.css ", @@ -349,10 +353,6 @@ Array [ ] `; -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": warnings 1`] = `Array []`; - -exports[`CssMinimizerPlugin should work with warnings and use memory cache when the "cache" option is "true": warnings 2`] = `Array []`; - exports[`CssMinimizerPlugin should write stdout and stderr of workers to stdout and stderr of main process in parallel mode: assets 1`] = ` Object { "one.css": ".minify {};",