├── .cspell.json ├── .editorconfig ├── .gitattributes ├── .github └── workflows │ ├── dependency-review.yml │ └── nodejs.yml ├── .gitignore ├── .husky ├── commit-msg └── pre-commit ├── .prettierignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── babel.config.js ├── commitlint.config.js ├── eslint.config.mjs ├── jest.config.js ├── lint-staged.config.js ├── package.json ├── setupTest.js ├── src ├── index.js ├── minify.js ├── options.json └── utils.js ├── test ├── CssMinimizerPlugin.test.js ├── __snapshots__ │ ├── CssMinimizerPlugin.test.js.snap │ ├── cache-option.test.js.snap │ ├── exclude-option.test.js.snap │ ├── include-option.test.js.snap │ ├── minify-option.test.js.snap │ ├── minimizerOptions-option.test.js.snap │ ├── parallel-option.test.js.snap │ ├── sourceMap-option.test.js.snap │ ├── test-option.test.js.snap │ ├── validate-options.test.js.snap │ ├── warningsFilter-option.test.js.snap │ └── worker.test.js.snap ├── cache-option.test.js ├── exclude-option.test.js ├── fixtures │ ├── cache-1.js │ ├── cache-2.js │ ├── cache-3.js │ ├── cache-4.js │ ├── cache.js │ ├── entry.js │ ├── excluded1.js │ ├── excluded2.js │ ├── foo.css │ ├── included1.js │ ├── included2.js │ ├── minimizerOptions │ │ ├── discardComments.css │ │ ├── discardEmpty.css │ │ ├── mergeRules.css │ │ └── order.css │ ├── nesting.css │ ├── simple-async.js │ ├── simple-emit-2.js │ ├── simple-emit.js │ ├── simple.js │ ├── sourcemap │ │ ├── bar.css │ │ ├── bar.scss │ │ ├── foo.css │ │ └── foo.scss │ ├── sss │ │ └── index.sss │ ├── sugarss.js │ ├── test │ │ ├── bar1.css │ │ ├── bar2.css │ │ ├── error.css │ │ └── foo.css │ └── wrong-calc.css ├── helpers │ ├── EmitNewAsset.js │ ├── ModifyExistingAsset.js │ ├── compile.js │ ├── emitAssetInChildCompilationLoader.js │ ├── emitAssetLoader.js │ ├── emitAssetLoader2.js │ ├── getCompiler.js │ ├── getErrors.js │ ├── getWarnings.js │ ├── index.js │ ├── normalizeErrors.js │ ├── readAsset.js │ └── readAssets.js ├── include-option.test.js ├── minify-option.test.js ├── minimizerOptions-option.test.js ├── parallel-option.test.js ├── sourceMap-option.test.js ├── test-option.test.js ├── validate-options.test.js ├── warningsFilter-option.test.js └── worker.test.js ├── tsconfig.json └── types ├── index.d.ts ├── minify.d.ts └── utils.d.ts /.cspell.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/.cspell.json -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/.editorconfig -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/.gitattributes -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/.github/workflows/dependency-review.yml -------------------------------------------------------------------------------- /.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/.github/workflows/nodejs.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/.gitignore -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | commitlint --edit $1 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | lint-staged 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | /coverage 2 | /dist 3 | /node_modules 4 | /test/fixtures 5 | CHANGELOG.md -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/README.md -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/babel.config.js -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/commitlint.config.js -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/eslint.config.mjs -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/jest.config.js -------------------------------------------------------------------------------- /lint-staged.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/lint-staged.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/package.json -------------------------------------------------------------------------------- /setupTest.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/setupTest.js -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/src/index.js -------------------------------------------------------------------------------- /src/minify.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/src/minify.js -------------------------------------------------------------------------------- /src/options.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/src/options.json -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/src/utils.js -------------------------------------------------------------------------------- /test/CssMinimizerPlugin.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/CssMinimizerPlugin.test.js -------------------------------------------------------------------------------- /test/__snapshots__/CssMinimizerPlugin.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/CssMinimizerPlugin.test.js.snap -------------------------------------------------------------------------------- /test/__snapshots__/cache-option.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/cache-option.test.js.snap -------------------------------------------------------------------------------- /test/__snapshots__/exclude-option.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/exclude-option.test.js.snap -------------------------------------------------------------------------------- /test/__snapshots__/include-option.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/include-option.test.js.snap -------------------------------------------------------------------------------- /test/__snapshots__/minify-option.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/minify-option.test.js.snap -------------------------------------------------------------------------------- /test/__snapshots__/minimizerOptions-option.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/minimizerOptions-option.test.js.snap -------------------------------------------------------------------------------- /test/__snapshots__/parallel-option.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/parallel-option.test.js.snap -------------------------------------------------------------------------------- /test/__snapshots__/sourceMap-option.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/sourceMap-option.test.js.snap -------------------------------------------------------------------------------- /test/__snapshots__/test-option.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/test-option.test.js.snap -------------------------------------------------------------------------------- /test/__snapshots__/validate-options.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/validate-options.test.js.snap -------------------------------------------------------------------------------- /test/__snapshots__/warningsFilter-option.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/warningsFilter-option.test.js.snap -------------------------------------------------------------------------------- /test/__snapshots__/worker.test.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/__snapshots__/worker.test.js.snap -------------------------------------------------------------------------------- /test/cache-option.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/cache-option.test.js -------------------------------------------------------------------------------- /test/exclude-option.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/exclude-option.test.js -------------------------------------------------------------------------------- /test/fixtures/cache-1.js: -------------------------------------------------------------------------------- 1 | import './test/foo.css'; 2 | -------------------------------------------------------------------------------- /test/fixtures/cache-2.js: -------------------------------------------------------------------------------- 1 | import './test/bar1.css'; 2 | -------------------------------------------------------------------------------- /test/fixtures/cache-3.js: -------------------------------------------------------------------------------- 1 | import './test/bar2.css'; 2 | -------------------------------------------------------------------------------- /test/fixtures/cache-4.js: -------------------------------------------------------------------------------- 1 | import './test/bar1.css'; 2 | -------------------------------------------------------------------------------- /test/fixtures/cache.js: -------------------------------------------------------------------------------- 1 | import './test/foo.css'; 2 | -------------------------------------------------------------------------------- /test/fixtures/entry.js: -------------------------------------------------------------------------------- 1 | import './foo.css'; 2 | -------------------------------------------------------------------------------- /test/fixtures/excluded1.js: -------------------------------------------------------------------------------- 1 | import './test/foo.css'; 2 | -------------------------------------------------------------------------------- /test/fixtures/excluded2.js: -------------------------------------------------------------------------------- 1 | import './test/bar1.css'; 2 | -------------------------------------------------------------------------------- /test/fixtures/foo.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/fixtures/foo.css -------------------------------------------------------------------------------- /test/fixtures/included1.js: -------------------------------------------------------------------------------- 1 | import './test/foo.css'; 2 | -------------------------------------------------------------------------------- /test/fixtures/included2.js: -------------------------------------------------------------------------------- 1 | import './test/bar1.css'; 2 | -------------------------------------------------------------------------------- /test/fixtures/minimizerOptions/discardComments.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/fixtures/minimizerOptions/discardComments.css -------------------------------------------------------------------------------- /test/fixtures/minimizerOptions/discardEmpty.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/fixtures/minimizerOptions/discardEmpty.css -------------------------------------------------------------------------------- /test/fixtures/minimizerOptions/mergeRules.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/fixtures/minimizerOptions/mergeRules.css -------------------------------------------------------------------------------- /test/fixtures/minimizerOptions/order.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/fixtures/minimizerOptions/order.css -------------------------------------------------------------------------------- /test/fixtures/nesting.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/fixtures/nesting.css -------------------------------------------------------------------------------- /test/fixtures/simple-async.js: -------------------------------------------------------------------------------- 1 | export default 'bar'; 2 | -------------------------------------------------------------------------------- /test/fixtures/simple-emit-2.js: -------------------------------------------------------------------------------- 1 | export default 'bar'; 2 | -------------------------------------------------------------------------------- /test/fixtures/simple-emit.js: -------------------------------------------------------------------------------- 1 | export default 'foo'; 2 | -------------------------------------------------------------------------------- /test/fixtures/simple.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/fixtures/simple.js -------------------------------------------------------------------------------- /test/fixtures/sourcemap/bar.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-weight: bold; 3 | } -------------------------------------------------------------------------------- /test/fixtures/sourcemap/bar.scss: -------------------------------------------------------------------------------- 1 | body { 2 | font-weight: bold; 3 | } -------------------------------------------------------------------------------- /test/fixtures/sourcemap/foo.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/fixtures/sourcemap/foo.css -------------------------------------------------------------------------------- /test/fixtures/sourcemap/foo.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/fixtures/sourcemap/foo.scss -------------------------------------------------------------------------------- /test/fixtures/sss/index.sss: -------------------------------------------------------------------------------- 1 | a 2 | color: black 3 | -------------------------------------------------------------------------------- /test/fixtures/sugarss.js: -------------------------------------------------------------------------------- 1 | export const foo = 'foo'; 2 | -------------------------------------------------------------------------------- /test/fixtures/test/bar1.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/fixtures/test/bar1.css -------------------------------------------------------------------------------- /test/fixtures/test/bar2.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/fixtures/test/bar2.css -------------------------------------------------------------------------------- /test/fixtures/test/error.css: -------------------------------------------------------------------------------- 1 | null 2 | -------------------------------------------------------------------------------- /test/fixtures/test/foo.css: -------------------------------------------------------------------------------- 1 | a { 2 | text-align: center; 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/wrong-calc.css: -------------------------------------------------------------------------------- 1 | width: calc(100px + 100); 2 | -------------------------------------------------------------------------------- /test/helpers/EmitNewAsset.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/EmitNewAsset.js -------------------------------------------------------------------------------- /test/helpers/ModifyExistingAsset.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/ModifyExistingAsset.js -------------------------------------------------------------------------------- /test/helpers/compile.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/compile.js -------------------------------------------------------------------------------- /test/helpers/emitAssetInChildCompilationLoader.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/emitAssetInChildCompilationLoader.js -------------------------------------------------------------------------------- /test/helpers/emitAssetLoader.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/emitAssetLoader.js -------------------------------------------------------------------------------- /test/helpers/emitAssetLoader2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/emitAssetLoader2.js -------------------------------------------------------------------------------- /test/helpers/getCompiler.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/getCompiler.js -------------------------------------------------------------------------------- /test/helpers/getErrors.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/getErrors.js -------------------------------------------------------------------------------- /test/helpers/getWarnings.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/getWarnings.js -------------------------------------------------------------------------------- /test/helpers/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/index.js -------------------------------------------------------------------------------- /test/helpers/normalizeErrors.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/normalizeErrors.js -------------------------------------------------------------------------------- /test/helpers/readAsset.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/readAsset.js -------------------------------------------------------------------------------- /test/helpers/readAssets.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/helpers/readAssets.js -------------------------------------------------------------------------------- /test/include-option.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/include-option.test.js -------------------------------------------------------------------------------- /test/minify-option.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/minify-option.test.js -------------------------------------------------------------------------------- /test/minimizerOptions-option.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/minimizerOptions-option.test.js -------------------------------------------------------------------------------- /test/parallel-option.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/parallel-option.test.js -------------------------------------------------------------------------------- /test/sourceMap-option.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/sourceMap-option.test.js -------------------------------------------------------------------------------- /test/test-option.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/test-option.test.js -------------------------------------------------------------------------------- /test/validate-options.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/validate-options.test.js -------------------------------------------------------------------------------- /test/warningsFilter-option.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/warningsFilter-option.test.js -------------------------------------------------------------------------------- /test/worker.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/test/worker.test.js -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/tsconfig.json -------------------------------------------------------------------------------- /types/index.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/types/index.d.ts -------------------------------------------------------------------------------- /types/minify.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/types/minify.d.ts -------------------------------------------------------------------------------- /types/utils.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webpack/css-minimizer-webpack-plugin/HEAD/types/utils.d.ts --------------------------------------------------------------------------------