astro-html-minifier-next 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +6 -5
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  [![Version badge](https://img.shields.io/npm/v/astro-html-minifier-next?style=for-the-badge&label=Version&labelColor=2a2d35&color=f2ebf4)][latest-release]
10
10
  [![NPM downloads badge](https://img.shields.io/npm/d18m/astro-html-minifier-next?style=for-the-badge&label=NPM%20Downloads&labelColor=2a2d35&color=e13fa0&cacheSeconds=86400)][package-on-npm]
11
11
  [![JSR score badge](https://jsr.io/badges/@jonasgeiler/astro-html-minifier-next/score?style=for-the-badge&label=Score&logoColor=fff&labelColor=2a2d35&color=f2ebf4&cacheSeconds=86400)][package-on-jsr]
12
- [![Minified size (gzip) badge](https://img.shields.io/bundlejs/size/astro-html-minifier-next?style=for-the-badge&labelColor=2a2d35&color=e13fa0&cacheSeconds=86400)][package-on-bundlejs]
12
+ [![NPM unpacked size badge](https://img.shields.io/npm/unpacked-size/astro-html-minifier-next?style=for-the-badge&labelColor=2a2d35&color=e13fa0)][package-on-bundlejs]
13
13
 
14
14
  ```typescript
15
15
  import { defineConfig } from "astro/config";
@@ -20,6 +20,7 @@ export default defineConfig({
20
20
  htmlMinifier({
21
21
  /* My recommended html-minifier-next options: */
22
22
  caseSensitive: true,
23
+ collapseAttributeWhitespace: false,
23
24
  collapseBooleanAttributes: true,
24
25
  collapseInlineTagWhitespace: false,
25
26
  collapseWhitespace: true,
@@ -27,11 +28,11 @@ export default defineConfig({
27
28
  continueOnMinifyError: false,
28
29
  continueOnParseError: false,
29
30
  decodeEntities: true,
30
- html5: true,
31
31
  includeAutoGeneratedTags: true,
32
32
  keepClosingSlash: false,
33
33
  minifyCSS: true,
34
34
  minifyJS: true,
35
+ minifySVG: true,
35
36
  minifyURLs: false,
36
37
  noNewlinesBeforeTagClose: false,
37
38
  preserveLineBreaks: false,
@@ -47,7 +48,7 @@ export default defineConfig({
47
48
  removeStyleLinkTypeAttributes: true,
48
49
  removeTagWhitespace: false,
49
50
  sortAttributes: false,
50
- sortClassName: false,
51
+ sortClassNames: false,
51
52
  useShortDoctype: true,
52
53
  }),
53
54
  ],
@@ -171,9 +172,9 @@ of course [Jens Oliver Meiert aka. @j9t][@j9t] ([html-minifier-next][html-minifi
171
172
  [astro]: https://astro.build/
172
173
  [html-minifier-next]: https://www.npmjs.com/package/html-minifier-next
173
174
  [html-minifier-next-options]: https://www.npmjs.com/package/html-minifier-next#options-quick-reference
174
- [html-minifier-next-options-source]: https://github.com/j9t/html-minifier-next/blob/ba95daa75dfec6e3c6bb8bd1b0af3ad84e596e61/src/htmlminifier.js#L1482
175
+ [html-minifier-next-options-source]: https://github.com/j9t/html-minifier-next/blob/e2995fc35a7a3906d3d1960d508d0d24a02128c8/src/htmlminifier.js#L1501
175
176
  [latest-release]: https://github.com/jonasgeiler/astro-html-minifier-next/releases/latest
176
- [package-on-bundlejs]: https://bundlejs.com/?q=astro-html-minifier-next
177
+ [package-on-bundlejs]: https://bundlejs.com/?q=astro-html-minifier-next&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22lightningcss%22%5D%7D%7D
177
178
  [package-on-jsr]: https://jsr.io/@jonasgeiler/astro-html-minifier-next
178
179
  [package-on-npm]: https://www.npmjs.com/package/astro-html-minifier-next
179
180
  [browserslist]: https://browsersl.ist/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-html-minifier-next",
3
- "version": "2.1.0",
3
+ "version": "3.0.0",
4
4
  "description": "Minify Astro HTML assets using html-minifier-next!",
5
5
  "homepage": "https://github.com/jonasgeiler/astro-html-minifier-next#readme",
6
6
  "bugs": "https://github.com/jonasgeiler/astro-html-minifier-next/issues",
@@ -18,12 +18,12 @@
18
18
  "astro": "^5.0.0"
19
19
  },
20
20
  "dependencies": {
21
- "html-minifier-next": "^4.3.0"
21
+ "html-minifier-next": "^5.2.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@biomejs/biome": "2.3.2",
25
- "@types/node": "24.9.2",
26
- "astro": "5.16.0",
24
+ "@biomejs/biome": "2.3.15",
25
+ "@types/node": "24.12.0",
26
+ "astro": "5.16.16",
27
27
  "typescript": "5.9.3"
28
28
  },
29
29
  "type": "module",