vite-plugin-singlefile-compression 1.4.0 → 1.4.1

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 (3) hide show
  1. package/README.md +60 -52
  2. package/dist/index.js +1 -1
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -37,58 +37,66 @@ const router = createRouter({
37
37
 
38
38
  ## Options
39
39
 
40
- See [src/options.ts](src/options.ts)
40
+ Example:
41
+
42
+ ```ts
43
+ singleFileCompression({
44
+ rename: 'example.html'
45
+ }),
46
+ ```
47
+
48
+ More info see [src/options.ts](src/options.ts)
41
49
 
42
50
  ```ts
43
51
  export interface Options {
44
- /**
45
- * Rename index.html
46
- */
47
- rename?: string
48
-
49
- /**
50
- * https://github.com/terser/html-minifier-terser?tab=readme-ov-file#options-quick-reference
51
- * @default defaultHtmlMinifierTerserOptions
52
- */
53
- htmlMinifierTerser?: htmlMinifierOptions | boolean
54
-
55
- /**
56
- * Try inline html used assets, if inlined or not used in JS.
57
- * @default true
58
- */
59
- tryInlineHtmlAssets?: boolean
60
-
61
- /**
62
- * Remove inlined asset files.
63
- * @default true
64
- */
65
- removeInlinedAssetFiles?: boolean
66
-
67
- /**
68
- * Try inline html icon, if icon is in public dir.
69
- * @default true
70
- */
71
- tryInlineHtmlPublicIcon?: boolean
72
-
73
- /**
74
- * Remove inlined html icon files.
75
- * @default true
76
- */
77
- removeInlinedPublicIconFiles?: boolean
78
-
79
- /**
80
- * Use Base128 to encode gzipped script.
81
- * If false, use Base64.
82
- * https://www.npmjs.com/package/base128-ascii
83
- * @default true
84
- */
85
- useBase128?: boolean
86
-
87
- /**
88
- * Compress format.
89
- * @default "deflate-raw"
90
- */
91
- compressFormat?: compressFormat
52
+ /**
53
+ * Rename index.html
54
+ */
55
+ rename?: string;
56
+
57
+ /**
58
+ * https://github.com/terser/html-minifier-terser?tab=readme-ov-file#options-quick-reference
59
+ * @default defaultHtmlMinifierTerserOptions
60
+ */
61
+ htmlMinifierTerser?: htmlMinifierOptions | boolean;
62
+
63
+ /**
64
+ * Try inline html used assets, if inlined or not used in JS.
65
+ * @default true
66
+ */
67
+ tryInlineHtmlAssets?: boolean;
68
+
69
+ /**
70
+ * Remove inlined asset files.
71
+ * @default true
72
+ */
73
+ removeInlinedAssetFiles?: boolean;
74
+
75
+ /**
76
+ * Try inline html icon, if icon is in public dir.
77
+ * @default true
78
+ */
79
+ tryInlineHtmlPublicIcon?: boolean;
80
+
81
+ /**
82
+ * Remove inlined html icon files.
83
+ * @default true
84
+ */
85
+ removeInlinedPublicIconFiles?: boolean;
86
+
87
+ /**
88
+ * Use Base128 to encode gzipped script.
89
+ * If false, use Base64.
90
+ * https://www.npmjs.com/package/base128-ascii
91
+ * @default true
92
+ */
93
+ useBase128?: boolean;
94
+
95
+ /**
96
+ * Compress format.
97
+ * @default "deflate-raw"
98
+ */
99
+ compressFormat?: compressFormat;
92
100
  }
93
101
  ```
94
102
 
@@ -97,11 +105,11 @@ export interface Options {
97
105
  https://bddjr.github.io/vite-plugin-singlefile-compression/
98
106
 
99
107
  ```
100
- vite v6.0.7 building for production...
108
+ vite v6.0.11 building for production...
101
109
  ✓ 45 modules transformed.
102
110
  rendering chunks (1)...
103
111
 
104
- vite-plugin-singlefile-compression 1.4.0 building...
112
+ vite-plugin-singlefile-compression 1.4.1 building...
105
113
 
106
114
  file:///D:/bddjr/Desktop/code/js/vite-plugin-singlefile-compression/test/dist/index.html
107
115
  101.56 KiB -> 46.32 KiB
@@ -109,7 +117,7 @@ vite-plugin-singlefile-compression 1.4.0 building...
109
117
  Finish.
110
118
 
111
119
  dist/index.html 47.42 kB
112
- ✓ built in 698ms
120
+ ✓ built in 680ms
113
121
  ```
114
122
 
115
123
  ![](effect.jpg)
package/dist/index.js CHANGED
@@ -48,7 +48,7 @@ function setConfig(config) {
48
48
  }
49
49
  }
50
50
  async function generateBundle(bundle, config, options) {
51
- console.log(pc.reset('') + pc.cyan('\n\nvite-plugin-singlefile-compression ' + version) + pc.green(' building...'));
51
+ console.log(pc.reset('\n\n') + pc.cyan('vite-plugin-singlefile-compression ' + version) + pc.green(' building...'));
52
52
  // rename
53
53
  if (options.rename
54
54
  && options.rename !== "index.html"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-singlefile-compression",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -41,7 +41,7 @@
41
41
  ],
42
42
  "dependencies": {
43
43
  "@types/html-minifier-terser": "^7.0.2",
44
- "@types/node": "^22.9.3",
44
+ "@types/node": "^22.10.7",
45
45
  "base128-ascii": "^2.1.0",
46
46
  "esbuild": "^0.24.0",
47
47
  "html-minifier-terser": "^7.2.0",
@@ -50,6 +50,6 @@
50
50
  "picocolors": "^1.1.1",
51
51
  "rimraf": "^6.0.1",
52
52
  "typescript": "^5.7.2",
53
- "vite": "^6.0.7"
53
+ "vite": "^6.0.11"
54
54
  }
55
55
  }