vite-plugin-singlefile-compression 1.2.2 → 1.2.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.
package/README.md CHANGED
@@ -86,6 +86,7 @@ export interface Options {
86
86
  /**
87
87
  * Use Base128 to encode gzipped script.
88
88
  * If false, use Base64.
89
+ * https://www.npmjs.com/package/base128-ascii
89
90
  * @default true
90
91
  */
91
92
  useBase128?: boolean
@@ -101,15 +102,15 @@ vite v6.0.6 building for production...
101
102
  ✓ 45 modules transformed.
102
103
  rendering chunks (1)...
103
104
 
104
- vite-plugin-singlefile-compression 1.2.2 building...
105
+ vite-plugin-singlefile-compression 1.2.4 building...
105
106
 
106
107
  file:///D:/bddjr/Desktop/code/js/vite-plugin-singlefile-compression/test/dist/index.html
107
- 101.02 KiB -> 46.54 KiB
108
+ 101.02 KiB -> 46.52 KiB
108
109
 
109
110
  Finish.
110
111
 
111
- dist/index.html 47.65 kB
112
- ✓ built in 694ms
112
+ dist/index.html 47.64 kB
113
+ ✓ built in 690ms
113
114
  ```
114
115
 
115
116
  ## Clone
package/dist/index.d.ts CHANGED
@@ -29,6 +29,7 @@ export interface Options {
29
29
  /**
30
30
  * Use Base128 to encode gzipped script.
31
31
  * If false, use Base64.
32
+ * https://www.npmjs.com/package/base128-ascii
32
33
  * @default true
33
34
  */
34
35
  useBase128?: boolean;
@@ -1 +1 @@
1
- {const a={"":""};for(const n in a){for(const e of document.querySelectorAll(`[src="data:${n}"]`))e.src=a[n];for(const e of document.querySelectorAll(`[href="data:${n}"]`))e.href=a[n]}}
1
+ {let e={"":""};for(let o in e){for(let r of document.querySelectorAll(`[src="data:${o}"]`))r.src=e[o];for(let r of document.querySelectorAll(`[href="data:${o}"]`))r.href=e[o]}}
@@ -1 +1 @@
1
- function c(e){let l=0,o=0,n,r=new Uint8Array(Math.floor(e.length/8*7));function t(){return n=e.charCodeAt(l++)||0}for(;l<e.length;)r[o++]=t()<<1|t()>>6,r[o++]=n<<2|t()>>5,r[o++]=n<<3|t()>>4,r[o++]=n<<4|t()>>3,r[o++]=n<<5|t()>>2,r[o++]=n<<6|t()>>1,r[o++]=n<<7|t();return r}new Response(new ReadableStream({start(e){e.enqueue(c("<script>")),e.close()}}).pipeThrough(new DecompressionStream("gzip")),{headers:{"Content-Type":"text/javascript"}}).blob().then(e=>import(e=URL.createObjectURL(e)).finally(()=>URL.revokeObjectURL(e)))
1
+ function s(e){let l=0,o=0,n,r=()=>n=e.charCodeAt(l++),t=new Uint8Array(Math.floor(e.length/8*7));for(;l<e.length;)t[o++]=r()<<1|r()>>6,t[o++]=n<<2|r()>>5,t[o++]=n<<3|r()>>4,t[o++]=n<<4|r()>>3,t[o++]=n<<5|r()>>2,t[o++]=n<<6|r()>>1,t[o++]=n<<7|r();return t}new Response(new ReadableStream({start(e){e.enqueue(s("<script>")),e.close()}}).pipeThrough(new DecompressionStream("gzip")),{headers:{"Content-Type":"text/javascript"}}).blob().then(e=>import(e=URL.createObjectURL(e)).finally(()=>URL.revokeObjectURL(e)))
package/dist/template.js CHANGED
@@ -1 +1 @@
1
- fetch("data:application/gzip;base64,{<script>}").then(r=>new Response(r.body.pipeThrough(new DecompressionStream("gzip")),{headers:{"Content-Type":"text/javascript"}}).blob()).then(b=>import(b=URL.createObjectURL(b)).finally(()=>URL.revokeObjectURL(b)))
1
+ fetch("data:application/gzip;base64,{<script>}").then(e=>new Response(e.body.pipeThrough(new DecompressionStream("gzip")),{headers:{"Content-Type":"text/javascript"}}).blob()).then(e=>import(e=URL.createObjectURL(e)).finally(()=>URL.revokeObjectURL(e)))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-singlefile-compression",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
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.0",
45
+ "base128-ascii": "^2.0.1",
46
46
  "esbuild": "^0.24.0",
47
47
  "html-minifier-terser": "^7.2.0",
48
48
  "mime": "^4.0.4",