vite-plugin-singlefile-compression 2.0.3 → 2.0.5
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/LICENSE.txt +1 -1
- package/README.md +6 -13
- package/dist/cutPrefix.d.ts +1 -0
- package/dist/cutPrefix.js +5 -0
- package/dist/getTemplate.d.ts +5 -2
- package/dist/getTemplate.js +26 -5
- package/dist/index.js +80 -103
- package/dist/template/css.js +1 -0
- package/dist/template/icon.js +1 -0
- package/dist/template/importmeta.js +1 -0
- package/package.json +13 -11
- package/dist/template/LICENSE.txt +0 -24
- package/dist/template/resolve.js +0 -1
package/LICENSE.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
|
-
Copyright © 2024
|
|
2
|
+
Copyright © 2024 bddjr
|
|
3
3
|
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
5
|
|
package/README.md
CHANGED
|
@@ -105,19 +105,19 @@ export interface Options {
|
|
|
105
105
|
https://bddjr.github.io/vite-plugin-singlefile-compression/
|
|
106
106
|
|
|
107
107
|
```
|
|
108
|
-
vite v6.
|
|
108
|
+
vite v6.2.6 building for production...
|
|
109
109
|
✓ 45 modules transformed.
|
|
110
110
|
rendering chunks (1)...
|
|
111
111
|
|
|
112
|
-
vite-plugin-singlefile-compression 2.0.
|
|
112
|
+
vite-plugin-singlefile-compression 2.0.5 building...
|
|
113
113
|
|
|
114
|
-
file:///D:/
|
|
115
|
-
101.
|
|
114
|
+
file:///D:/code/js/vite-plugin-singlefile-compression/test/dist/index.html
|
|
115
|
+
101.63 KiB -> 46.42 KiB
|
|
116
116
|
|
|
117
117
|
Finish.
|
|
118
118
|
|
|
119
|
-
dist/index.html 47.
|
|
120
|
-
✓ built in
|
|
119
|
+
dist/index.html 47.53 kB
|
|
120
|
+
✓ built in 770ms
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|

|
|
@@ -133,10 +133,3 @@ npm i
|
|
|
133
133
|
cd ..
|
|
134
134
|
npm run build
|
|
135
135
|
```
|
|
136
|
-
|
|
137
|
-
## License
|
|
138
|
-
|
|
139
|
-
Using [MIT License](LICENSE.txt).
|
|
140
|
-
[src/template](src/template) using [Unlicense](src/template/LICENSE.txt).
|
|
141
|
-
|
|
142
|
-
Adapted from [vite-plugin-singlefile](https://www.npmjs.com/package/vite-plugin-singlefile).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function cutPrefix(str: string, prefix: string): string;
|
package/dist/getTemplate.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { compressFormat } from './compress.js';
|
|
1
2
|
export declare const template: {
|
|
2
|
-
base(script: string, format:
|
|
3
|
+
base(script: string, format: compressFormat, useBase128: boolean): string;
|
|
3
4
|
assets(assetsJSON: string): string;
|
|
4
|
-
|
|
5
|
+
css(cssSource: string): string;
|
|
6
|
+
icon(dataURL: string): string;
|
|
7
|
+
importmeta(p: string): string;
|
|
5
8
|
};
|
package/dist/getTemplate.js
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import { fileURLToPath } from 'url';
|
|
3
|
+
import { compress } from './compress.js';
|
|
4
|
+
function r(name) {
|
|
5
|
+
return fs.readFileSync(fileURLToPath(import.meta.resolve(`./template/${name}.js`))).toString();
|
|
6
|
+
}
|
|
7
|
+
function rt(name, template) {
|
|
8
|
+
const s = r(name).split(template, 2);
|
|
9
|
+
if (s.length !== 2)
|
|
10
|
+
throw "s.length!==2";
|
|
11
|
+
return s;
|
|
12
|
+
}
|
|
3
13
|
const files = {
|
|
4
|
-
base64:
|
|
5
|
-
base128:
|
|
6
|
-
assets:
|
|
7
|
-
|
|
14
|
+
base64: r('base64'),
|
|
15
|
+
base128: r('base128'),
|
|
16
|
+
assets: rt('assets', '{"":""}'),
|
|
17
|
+
css: rt('css', '"<style>"'),
|
|
18
|
+
icon: rt('icon', '"<icon>"'),
|
|
19
|
+
importmeta: rt('importmeta', '"<path>"'),
|
|
8
20
|
};
|
|
9
21
|
export const template = {
|
|
10
22
|
base(script, format, useBase128) {
|
|
23
|
+
script = compress(format, script, useBase128);
|
|
11
24
|
if (useBase128) {
|
|
12
25
|
return files.base128
|
|
13
26
|
.replace("<format>", format)
|
|
@@ -20,5 +33,13 @@ export const template = {
|
|
|
20
33
|
assets(assetsJSON) {
|
|
21
34
|
return files.assets.join(assetsJSON);
|
|
22
35
|
},
|
|
23
|
-
|
|
36
|
+
css(cssSource) {
|
|
37
|
+
return files.css.join(JSON.stringify(cssSource));
|
|
38
|
+
},
|
|
39
|
+
icon(dataURL) {
|
|
40
|
+
return files.icon.join(JSON.stringify(dataURL));
|
|
41
|
+
},
|
|
42
|
+
importmeta(p) {
|
|
43
|
+
return files.importmeta.join(JSON.stringify(p));
|
|
44
|
+
},
|
|
24
45
|
};
|
package/dist/index.js
CHANGED
|
@@ -6,10 +6,10 @@ import fs from 'fs';
|
|
|
6
6
|
import { pathToFileURL } from "url";
|
|
7
7
|
import { version } from './getVersion.js';
|
|
8
8
|
import { template } from './getTemplate.js';
|
|
9
|
-
import { compress } from "./compress.js";
|
|
10
9
|
import { bufferToDataURL } from "./dataurl.js";
|
|
11
10
|
import { KiB } from "./KiB.js";
|
|
12
11
|
import { getInnerOptions } from "./options.js";
|
|
12
|
+
import { cutPrefix } from "./cutPrefix.js";
|
|
13
13
|
export function singleFileCompression(opt) {
|
|
14
14
|
let conf;
|
|
15
15
|
return {
|
|
@@ -22,30 +22,16 @@ export function singleFileCompression(opt) {
|
|
|
22
22
|
}
|
|
23
23
|
export default singleFileCompression;
|
|
24
24
|
function setConfig(config) {
|
|
25
|
-
config.base
|
|
25
|
+
config.base ??= './';
|
|
26
26
|
config.build ??= {};
|
|
27
|
-
|
|
28
|
-
config.build.cssCodeSplit = false;
|
|
27
|
+
config.build.cssCodeSplit ??= false;
|
|
29
28
|
config.build.assetsInlineLimit ??= () => true;
|
|
30
|
-
config.build.chunkSizeWarningLimit ??=
|
|
29
|
+
config.build.chunkSizeWarningLimit ??= Number.MAX_SAFE_INTEGER;
|
|
31
30
|
config.build.modulePreload ??= { polyfill: false };
|
|
32
|
-
config.build.target ??= 'esnext';
|
|
33
31
|
config.build.reportCompressedSize ??= false;
|
|
34
32
|
config.build.rollupOptions ??= {};
|
|
35
|
-
config.build.rollupOptions.output ??= {}
|
|
36
|
-
|
|
37
|
-
output.inlineDynamicImports = true;
|
|
38
|
-
// delete output.assetFileNames
|
|
39
|
-
// delete output.chunkFileNames
|
|
40
|
-
// delete output.entryFileNames
|
|
41
|
-
}
|
|
42
|
-
if (Array.isArray(config.build.rollupOptions.output)) {
|
|
43
|
-
for (const output of config.build.rollupOptions.output) {
|
|
44
|
-
setRollupOutput(output);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
setRollupOutput(config.build.rollupOptions.output);
|
|
33
|
+
for (const output of [config.build.rollupOptions.output ??= {}].flat(1)) {
|
|
34
|
+
output.inlineDynamicImports ??= true;
|
|
49
35
|
}
|
|
50
36
|
}
|
|
51
37
|
async function generateBundle(bundle, config, options) {
|
|
@@ -59,23 +45,19 @@ async function generateBundle(bundle, config, options) {
|
|
|
59
45
|
bundle[options.rename].fileName = options.rename;
|
|
60
46
|
delete bundle["index.html"];
|
|
61
47
|
}
|
|
62
|
-
const distURL = pathToFileURL(config.build.outDir).href + '/'
|
|
48
|
+
const distURL = pathToFileURL(config.build.outDir).href + '/',
|
|
63
49
|
/** "assets/" */
|
|
64
|
-
|
|
50
|
+
assetsDir = path.posix.join(config.build.assetsDir, '/'),
|
|
51
|
+
/** "./assets/" */
|
|
52
|
+
assetsDirWithBase = config.base + assetsDir,
|
|
65
53
|
/** '[href^="./assets/"]' */
|
|
66
|
-
|
|
54
|
+
assetsHrefSelector = `[href^="${assetsDirWithBase}"]`,
|
|
67
55
|
/** '[src^="./assets/"]' */
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const globalDoNotDelete = new Set();
|
|
72
|
-
const globalRemoveDistFileNames = new Set();
|
|
73
|
-
const globalAssetsDataURL = {};
|
|
74
|
-
const globalPublicFilesCache = {};
|
|
75
|
-
/** fotmat: ["assets/index-XXXXXXXX.js"] */
|
|
76
|
-
const bundleAssetsNames = [];
|
|
56
|
+
assetsSrcSelector = `[src^="${assetsDirWithBase}"]`, fakeScript = `_vitePluginSinglefileCompression(${Date.now()})`, globalDelete = new Set(), globalDoNotDelete = new Set(), globalRemoveDistFileNames = new Set(), globalAssetsDataURL = {}, globalPublicFilesCache = {},
|
|
57
|
+
/** format: ["assets/index-XXXXXXXX.js"] */
|
|
58
|
+
bundleAssetsNames = [],
|
|
77
59
|
/** format: ["index.html"] */
|
|
78
|
-
|
|
60
|
+
bundleHTMLNames = [];
|
|
79
61
|
for (const name of Object.keys(bundle)) {
|
|
80
62
|
if (name.startsWith(assetsDir))
|
|
81
63
|
bundleAssetsNames.push(name);
|
|
@@ -83,50 +65,46 @@ async function generateBundle(bundle, config, options) {
|
|
|
83
65
|
bundleHTMLNames.push(name);
|
|
84
66
|
}
|
|
85
67
|
for (const htmlFileName of bundleHTMLNames) {
|
|
68
|
+
console.log("\n " + pc.underline(pc.cyan(distURL) + pc.greenBright(bundle[htmlFileName].fileName)));
|
|
86
69
|
// init
|
|
87
|
-
const htmlChunk = bundle[htmlFileName];
|
|
88
|
-
const oldHTML = htmlChunk.source;
|
|
70
|
+
const htmlChunk = bundle[htmlFileName], oldHTML = htmlChunk.source, dom = new JSDOM(oldHTML), document = dom.window.document, thisDel = new Set(), newJSCode = [], scriptElement = document.querySelector(`script[type=module]${assetsSrcSelector}`), scriptName = scriptElement ? cutPrefix(scriptElement.src, config.base) : '';
|
|
89
71
|
let oldSize = oldHTML.length;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
72
|
+
// fill fake script
|
|
73
|
+
if (scriptElement) {
|
|
74
|
+
scriptElement.remove();
|
|
75
|
+
scriptElement.removeAttribute('src');
|
|
76
|
+
scriptElement.innerHTML = fakeScript;
|
|
77
|
+
document.body.appendChild(scriptElement);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
document.body.insertAdjacentHTML('beforeend', `<script type="module">${fakeScript}</script>`);
|
|
96
81
|
}
|
|
97
|
-
const thisDel = new Set();
|
|
98
|
-
// Fix async import
|
|
99
|
-
const newJSCode = ["self.__VITE_PRELOAD__=void 0"];
|
|
100
82
|
// get css tag
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
globalDoNotDelete.add(name);
|
|
114
|
-
}
|
|
115
|
-
// add script for load css
|
|
116
|
-
newJSCode.push(
|
|
117
|
-
// 'document.querySelector("script[type=module]").insertAdjacentElement("afterend",document.createElement("style")).innerHTML='
|
|
118
|
-
'document.head.appendChild(document.createElement("style")).innerHTML='
|
|
119
|
-
+ JSON.stringify(cssSource.replace(/\n$/, '')));
|
|
83
|
+
let allCSS = '';
|
|
84
|
+
for (const element of document.querySelectorAll(`link[rel=stylesheet]${assetsHrefSelector}`)) {
|
|
85
|
+
const name = cutPrefix(element.href, config.base);
|
|
86
|
+
thisDel.add(name);
|
|
87
|
+
const css = bundle[name];
|
|
88
|
+
const cssSource = css.source;
|
|
89
|
+
if (cssSource) {
|
|
90
|
+
oldSize += cssSource.length;
|
|
91
|
+
// do not delete not inlined asset
|
|
92
|
+
for (const name of bundleAssetsNames) {
|
|
93
|
+
if (cssSource.includes(name.slice(assetsDir.length)))
|
|
94
|
+
globalDoNotDelete.add(name);
|
|
120
95
|
}
|
|
121
|
-
//
|
|
122
|
-
|
|
96
|
+
// add script for load css
|
|
97
|
+
allCSS += cssSource.replace(/\n$/, '');
|
|
123
98
|
}
|
|
99
|
+
// remove tag
|
|
100
|
+
element.remove();
|
|
124
101
|
}
|
|
102
|
+
newJSCode.push(template.css(allCSS));
|
|
125
103
|
// inline html assets
|
|
126
104
|
const assetsDataURL = {};
|
|
127
105
|
if (options.tryInlineHtmlAssets) {
|
|
128
106
|
for (const element of document.querySelectorAll(assetsSrcSelector)) {
|
|
129
|
-
const name = element.src
|
|
107
|
+
const name = cutPrefix(element.src, assetsDirWithBase);
|
|
130
108
|
if (name.endsWith('.js'))
|
|
131
109
|
continue;
|
|
132
110
|
if (!Object.hasOwn(assetsDataURL, name)) {
|
|
@@ -150,9 +128,9 @@ async function generateBundle(bundle, config, options) {
|
|
|
150
128
|
let needInline = true;
|
|
151
129
|
let iconName = 'favicon.ico';
|
|
152
130
|
// replace tag
|
|
153
|
-
const element = document.querySelector(
|
|
131
|
+
const element = document.querySelector(`link[rel=icon][href^="${config.base}"], link[rel="shortcut icon"][href^="${config.base}"]`);
|
|
154
132
|
if (element) {
|
|
155
|
-
iconName = element.href.
|
|
133
|
+
iconName = cutPrefix(element.href, config.base);
|
|
156
134
|
if (bundleAssetsNames.includes(iconName)) {
|
|
157
135
|
needInline = false;
|
|
158
136
|
}
|
|
@@ -183,7 +161,7 @@ async function generateBundle(bundle, config, options) {
|
|
|
183
161
|
}
|
|
184
162
|
const { dataURL, size } = globalPublicFilesCache[iconName];
|
|
185
163
|
oldSize += size;
|
|
186
|
-
newJSCode.push(
|
|
164
|
+
newJSCode.push(template.icon(dataURL));
|
|
187
165
|
if (!element) {
|
|
188
166
|
// add link icon tag
|
|
189
167
|
document.head.insertAdjacentHTML('beforeend', '<link rel="icon" href="data:">');
|
|
@@ -195,48 +173,47 @@ async function generateBundle(bundle, config, options) {
|
|
|
195
173
|
}
|
|
196
174
|
}
|
|
197
175
|
}
|
|
198
|
-
//
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
176
|
+
// generate html
|
|
177
|
+
htmlChunk.source = dom.serialize();
|
|
178
|
+
// minify html
|
|
179
|
+
if (options.htmlMinifierTerser)
|
|
180
|
+
htmlChunk.source = await htmlMinify(htmlChunk.source, options.htmlMinifierTerser);
|
|
181
|
+
// fill script
|
|
182
|
+
function inlineHtmlAssets() {
|
|
183
|
+
if (options.tryInlineHtmlAssets) {
|
|
184
|
+
// add script for load html assets
|
|
185
|
+
const assetsJSON = JSON.stringify(assetsDataURL);
|
|
186
|
+
if (assetsJSON !== '{}')
|
|
187
|
+
newJSCode.push(template.assets(assetsJSON));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (scriptElement) {
|
|
191
|
+
thisDel.add(scriptName);
|
|
192
|
+
let { code } = bundle[scriptName];
|
|
193
|
+
oldSize += code.length;
|
|
194
|
+
code = code.replace(/;?\n?$/, '');
|
|
208
195
|
// do not delete not inlined asset
|
|
209
196
|
for (const name of bundleAssetsNames) {
|
|
210
197
|
const assetName = name.slice(assetsDir.length);
|
|
211
|
-
if (
|
|
198
|
+
if (code.includes(assetName)) {
|
|
212
199
|
globalDoNotDelete.add(name);
|
|
213
200
|
delete assetsDataURL[assetName];
|
|
214
201
|
}
|
|
215
202
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
newJSCode.push(js.code.replace(/;?\n?$/, ''));
|
|
203
|
+
inlineHtmlAssets();
|
|
204
|
+
newJSCode.push(template.importmeta(scriptName));
|
|
205
|
+
// 此 polyfill 仅在以下选项的值为 true 时需要。
|
|
206
|
+
// config.build.rollupOptions.output.inlineDynamicImports
|
|
207
|
+
if (code.includes("__VITE_PRELOAD__"))
|
|
208
|
+
newJSCode.push("var __VITE_PRELOAD__");
|
|
209
|
+
newJSCode.push(code);
|
|
224
210
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
// generate html
|
|
230
|
-
htmlChunk.source = dom.serialize();
|
|
231
|
-
// minify html
|
|
232
|
-
if (options.htmlMinifierTerser)
|
|
233
|
-
htmlChunk.source = await htmlMinify(htmlChunk.source, options.htmlMinifierTerser);
|
|
234
|
-
// fill script
|
|
235
|
-
htmlChunk.source = htmlChunk.source.split(fakeScript, 2).join(template.base(compress(options.compressFormat, newJSCode.join(';'), options.useBase128), options.compressFormat, options.useBase128));
|
|
211
|
+
else {
|
|
212
|
+
inlineHtmlAssets();
|
|
213
|
+
}
|
|
214
|
+
htmlChunk.source = htmlChunk.source.split(fakeScript, 2).join(template.base(newJSCode.join(';'), options.compressFormat, options.useBase128));
|
|
236
215
|
// log
|
|
237
|
-
console.log("\n
|
|
238
|
-
+ " " + pc.underline(pc.cyan(distURL) + pc.greenBright(bundle[htmlFileName].fileName)) + '\n'
|
|
239
|
-
+ " " + pc.gray(KiB(oldSize) + " -> ") + pc.cyanBright(KiB(htmlChunk.source.length)) + '\n');
|
|
216
|
+
console.log(" " + pc.gray(KiB(oldSize) + " -> ") + pc.cyanBright(KiB(htmlChunk.source.length)) + '\n');
|
|
240
217
|
// delete assets
|
|
241
218
|
for (const name of thisDel) {
|
|
242
219
|
globalDelete.add(name);
|
|
@@ -261,5 +238,5 @@ async function generateBundle(bundle, config, options) {
|
|
|
261
238
|
}
|
|
262
239
|
}
|
|
263
240
|
}
|
|
264
|
-
console.log(pc.green('Finish
|
|
241
|
+
console.log(pc.green('Finish.') + pc.reset('\n'));
|
|
265
242
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
document.head.appendChild(document.createElement("style")).innerHTML="<style>"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
document.querySelector("link[rel=icon]").href="<icon>"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{import.meta.url=new URL("<path>",location).href;let t=import.meta.resolve;import.meta.resolve=e=>/^\.{0,2}\//.test(e)?new URL(e,import.meta.url).href:t(e)}
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-singlefile-compression",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
|
+
"author": "bddjr",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"description": "",
|
|
4
7
|
"main": "dist/index.js",
|
|
5
|
-
"
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
6
9
|
"files": [
|
|
7
10
|
"dist"
|
|
8
11
|
],
|
|
@@ -11,9 +14,6 @@
|
|
|
11
14
|
"build": "rimraf dist && tsc && node build.js && cd test && npm run build",
|
|
12
15
|
"prepublishOnly": "npm run build"
|
|
13
16
|
},
|
|
14
|
-
"author": "bddjr",
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"description": "",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "git+https://github.com/bddjr/vite-plugin-singlefile-compression.git"
|
|
@@ -31,9 +31,11 @@
|
|
|
31
31
|
"gzip",
|
|
32
32
|
"inline",
|
|
33
33
|
"frontend",
|
|
34
|
+
"front-end",
|
|
34
35
|
"js",
|
|
35
36
|
"javascript",
|
|
36
|
-
"css"
|
|
37
|
+
"css",
|
|
38
|
+
"class"
|
|
37
39
|
],
|
|
38
40
|
"dependencies": {
|
|
39
41
|
"base128-ascii": ">=2.1.0",
|
|
@@ -42,13 +44,13 @@
|
|
|
42
44
|
"mime": ">=4.0.4",
|
|
43
45
|
"mini-svg-data-uri": ">=1.4.4",
|
|
44
46
|
"picocolors": ">=1.1.1",
|
|
45
|
-
"
|
|
46
|
-
"vite": ">=6.2.5",
|
|
47
|
-
"@types/html-minifier-terser": ">=7.0.2",
|
|
48
|
-
"@types/node": ">=22.10.7",
|
|
49
|
-
"@types/jsdom": ">=21.1.7"
|
|
47
|
+
"@types/html-minifier-terser": ">=7.0.2"
|
|
50
48
|
},
|
|
51
49
|
"devDependencies": {
|
|
50
|
+
"vite": ">=6.2.5",
|
|
51
|
+
"rimraf": ">=6.0.1",
|
|
52
|
+
"@types/jsdom": ">=21.1.7",
|
|
53
|
+
"@types/node": ">=22.10.7",
|
|
52
54
|
"esbuild": ">=0.25.0",
|
|
53
55
|
"typescript": ">=5.7.2"
|
|
54
56
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
This is free and unencumbered software released into the public domain.
|
|
2
|
-
|
|
3
|
-
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
-
distribute this software, either in source code form or as a compiled
|
|
5
|
-
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
-
means.
|
|
7
|
-
|
|
8
|
-
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
-
of this software dedicate any and all copyright interest in the
|
|
10
|
-
software to the public domain. We make this dedication for the benefit
|
|
11
|
-
of the public at large and to the detriment of our heirs and
|
|
12
|
-
successors. We intend this dedication to be an overt act of
|
|
13
|
-
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
-
software under copyright law.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
-
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
-
|
|
24
|
-
For more information, please refer to <https://unlicense.org/>
|
package/dist/template/resolve.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{let t=import.meta.resolve;import.meta.resolve=e=>/^\.{0,2}\//.test(e)?new URL(e,import.meta.url).href:t(e)}
|