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 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
- terserOptions: {
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.5 building...
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.02 KiB -> 46.52 KiB
101
+ 101.56 KiB -> 46.84 KiB
113
102
 
114
103
  Finish.
115
104
 
116
- dist/index.html 47.64 kB
117
- ✓ built in 716ms
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.5",
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.2",
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",