diff --git a/.cspell.json b/.cspell.json index e0199bb..74ad4e5 100644 --- a/.cspell.json +++ b/.cspell.json @@ -40,7 +40,13 @@ "nocheck", "dont", "doctype", - "wilsonzlin" + "wilsonzlin", + "cssnano", + "csso", + "lightningcss", + "sourcefile", + "stringifier", + "sourcesContent" ], "ignorePaths": [ "CHANGELOG.md", diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 881e1c6..05cb254 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -65,6 +65,7 @@ jobs: name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 24.x] @@ -109,6 +110,14 @@ jobs: run: npm ci if: matrix.node-version != '10.x' && matrix.node-version != '12.x' && matrix.node-version != '14.x' && matrix.node-version != '16.x' && matrix.node-version != '18.x' + - name: Install older cssnano (Node 10/12) + if: matrix.node-version == '10.x' || matrix.node-version == '12.x' + run: npm install -D --no-save cssnano@^5 --force + + - name: Install older cssnano (Node 14/16) + if: matrix.node-version == '14.x' || matrix.node-version == '16.x' + run: npm install -D --no-save cssnano@^6 --force + - name: Install webpack ${{ matrix.webpack-version }} if: matrix.webpack-version != 'latest' run: npm i webpack@${{ matrix.webpack-version }} diff --git a/README.md b/README.md index 481e94d..1265c25 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,9 @@ # terser-webpack-plugin This plugin minifies your assets in a webpack build. It ships with several -built-in minimizers covering JavaScript, JSON, and HTML — pick one with the -[`minify`](#minify) option and target the right files with [`test`](#test). +built-in minimizers covering JavaScript, JSON, HTML, and CSS — pick one +with the [`minify`](#minify) option and target the right files with +[`test`](#test). JavaScript minimizers: @@ -34,6 +35,15 @@ HTML minimizers: - [`@swc/html`](https://github.com/swc-project/swc) — `TerserPlugin.swcMinifyHtml` (full HTML documents) and `TerserPlugin.swcMinifyHtmlFragment` (HTML fragments, e.g. `