vite-plugin-singlefile-compression 1.1.2 → 1.1.4

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 +35 -39
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # vite plugin singlefile compression
2
2
 
3
- This plugin compresses all JavaScript, CSS, images, etc. resources using gzip and embeds them into `dist/index.html`, making it convenient to share as a single HTML file.
3
+ Compress all assets and embeds them into `dist/index.html`, making it convenient to share as a single HTML file.
4
4
 
5
5
  The recipient can open it directly in the browser without manually unzipping the file.
6
6
 
@@ -60,35 +60,35 @@ const router = createRouter({
60
60
 
61
61
  ```ts
62
62
  export interface Options {
63
- /**
64
- * https://github.com/terser/html-minifier-terser?tab=readme-ov-file#options-quick-reference
65
- * @default defaultHtmlMinifierTerserOptions
66
- */
67
- htmlMinifierTerser?: htmlMinifierOptions | boolean
68
-
69
- /**
70
- * Try inline html used assets, if inlined or not used in JS.
71
- * @default true
72
- */
73
- tryInlineHtmlAssets?: boolean
74
-
75
- /**
76
- * Remove inlined asset files.
77
- * @default true
78
- */
79
- removeInlinedAssetFiles?: boolean
80
-
81
- /**
82
- * Try inline html icon, if icon is in public dir.
83
- * @default true
84
- */
85
- tryInlineHtmlPublicIcon?: boolean
86
-
87
- /**
88
- * Remove inlined html icon files.
89
- * @default true
90
- */
91
- removeInlinedPublicIconFiles?: boolean
63
+ /**
64
+ * https://github.com/terser/html-minifier-terser?tab=readme-ov-file#options-quick-reference
65
+ * @default defaultHtmlMinifierTerserOptions
66
+ */
67
+ htmlMinifierTerser?: htmlMinifierOptions | boolean;
68
+
69
+ /**
70
+ * Try inline html used assets, if inlined or not used in JS.
71
+ * @default true
72
+ */
73
+ tryInlineHtmlAssets?: boolean;
74
+
75
+ /**
76
+ * Remove inlined asset files.
77
+ * @default true
78
+ */
79
+ removeInlinedAssetFiles?: boolean;
80
+
81
+ /**
82
+ * Try inline html icon, if icon is in public dir.
83
+ * @default true
84
+ */
85
+ tryInlineHtmlPublicIcon?: boolean;
86
+
87
+ /**
88
+ * Remove inlined html icon files.
89
+ * @default true
90
+ */
91
+ removeInlinedPublicIconFiles?: boolean;
92
92
  }
93
93
  ```
94
94
 
@@ -97,23 +97,19 @@ export interface Options {
97
97
  https://bddjr.github.io/vite-plugin-singlefile-compression/
98
98
 
99
99
  ```
100
- vite v5.4.11 building for production...
100
+ vite v6.0.6 building for production...
101
101
  ✓ 45 modules transformed.
102
102
  rendering chunks (1)...
103
103
 
104
- vite-plugin-singlefile-compression 1.1.0 building...
104
+ vite-plugin-singlefile-compression 1.1.3 building...
105
105
 
106
106
  file:///D:/bddjr/Desktop/code/js/vite-plugin-singlefile-compression/test/dist/index.html
107
- 101.43 KiB -> 52.35 KiB
107
+ 101.02 KiB -> 52.1 KiB
108
108
 
109
109
  Finish.
110
110
 
111
- dist/index.html 53.60 kB
112
- ✓ built in 678ms
113
- ```
114
-
115
- ```html
116
- <!DOCTYPE html><meta charset=UTF-8><link rel=icon href=data:><meta name=viewport content="width=device-width,initial-scale=1"><title>Vite App</title><script type=module>fetch("data:application/gzip;base64,********").then(r=>r.blob()).then(b=>new Response(b.stream().pipeThrough(new DecompressionStream("gzip")),{headers:{"Content-Type":"text/javascript"}}).blob()).then(b=>import(b=URL.createObjectURL(b)).finally(()=>URL.revokeObjectURL(b)))</script><div id=app></div>
111
+ dist/index.html 53.35 kB
112
+ ✓ built in 734ms
117
113
  ```
118
114
 
119
115
  ## Clone
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-singlefile-compression",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "files": [
@@ -20,7 +20,7 @@
20
20
  "description": "",
21
21
  "repository": {
22
22
  "type": "git",
23
- "url": "https://github.com/bddjr/vite-plugin-singlefile-compression"
23
+ "url": "git+https://github.com/bddjr/vite-plugin-singlefile-compression.git"
24
24
  },
25
25
  "keywords": [
26
26
  "vite-plugin",