vite-plugin-singlefile-compression 1.2.5 → 1.2.6
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.
- package/README.md +5 -16
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,19 +26,8 @@ export default defineConfig({
|
|
|
26
26
|
singleFileCompression(),
|
|
27
27
|
],
|
|
28
28
|
|
|
29
|
-
// Not required options:
|
|
30
|
-
esbuild: {
|
|
31
|
-
// Remove license comments, make file smaller.
|
|
32
|
-
legalComments: "none"
|
|
33
|
-
},
|
|
34
29
|
build: {
|
|
35
|
-
|
|
36
|
-
format: {
|
|
37
|
-
// Remove license comments, make file smaller.
|
|
38
|
-
comments: false
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
// Not use old syntax, make file smaller.
|
|
30
|
+
// Not use old syntax, make file smaller.
|
|
42
31
|
target: 'esnext',
|
|
43
32
|
// Disable reporting compressed chunk sizes, slightly improve build speed.
|
|
44
33
|
reportCompressedSize: false
|
|
@@ -106,15 +95,15 @@ vite v6.0.7 building for production...
|
|
|
106
95
|
✓ 45 modules transformed.
|
|
107
96
|
rendering chunks (1)...
|
|
108
97
|
|
|
109
|
-
vite-plugin-singlefile-compression 1.2.
|
|
98
|
+
vite-plugin-singlefile-compression 1.2.6 building...
|
|
110
99
|
|
|
111
100
|
file:///D:/bddjr/Desktop/code/js/vite-plugin-singlefile-compression/test/dist/index.html
|
|
112
|
-
101.
|
|
101
|
+
101.56 KiB -> 46.84 KiB
|
|
113
102
|
|
|
114
103
|
Finish.
|
|
115
104
|
|
|
116
|
-
dist/index.html 47.
|
|
117
|
-
✓ built in
|
|
105
|
+
dist/index.html 47.96 kB
|
|
106
|
+
✓ built in 686ms
|
|
118
107
|
```
|
|
119
108
|
|
|
120
109
|
## Clone
|
package/dist/index.js
CHANGED
|
@@ -240,9 +240,9 @@ async function generateBundle(bundle, config, options) {
|
|
|
240
240
|
if (options.htmlMinifierTerser)
|
|
241
241
|
newHtml = await htmlMinify(newHtml, options.htmlMinifierTerser);
|
|
242
242
|
// fill script
|
|
243
|
-
newHtml = newHtml.split('self.__vitePluginSinglefileCompression=1', 2).join(options.useBase128
|
|
243
|
+
newHtml = newHtml.split('self.__vitePluginSinglefileCompression=1', 2).join('\n//vite-plugin-singlefile-compression\n' + (options.useBase128
|
|
244
244
|
? templateBase128.join(gzipToBase128(newJSCode.toString()))
|
|
245
|
-
: template.join(gzipToBase64(newJSCode.toString())));
|
|
245
|
+
: template.join(gzipToBase64(newJSCode.toString()))));
|
|
246
246
|
// finish
|
|
247
247
|
htmlChunk.source = newHtml;
|
|
248
248
|
console.log("\n"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-singlefile-compression",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@types/html-minifier-terser": "^7.0.2",
|
|
44
44
|
"@types/node": "^22.9.3",
|
|
45
|
-
"base128-ascii": "^2.0.
|
|
45
|
+
"base128-ascii": "^2.0.3",
|
|
46
46
|
"esbuild": "^0.24.0",
|
|
47
47
|
"html-minifier-terser": "^7.2.0",
|
|
48
48
|
"mime": "^4.0.4",
|