vite-plugin-singlefile-compression 2.4.1 → 2.4.2
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/dist/index.js +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import zlib from "zlib";
|
|
|
9
9
|
import svgToTinyDataUri from "mini-svg-data-uri";
|
|
10
10
|
import { lookup } from "mrmime";
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "2.4.
|
|
12
|
+
var version = "2.4.2";
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/compress.ts
|
|
15
15
|
const compressors = {
|
|
@@ -180,7 +180,7 @@ async function generateBundle(bundle, config, options) {
|
|
|
180
180
|
bundle[options.rename].fileName = options.rename;
|
|
181
181
|
delete bundle["index.html"];
|
|
182
182
|
}
|
|
183
|
-
const distURL = pathToFileURL(config.build.outDir).href + "/", assetsDir = path.posix.join(config.build.assetsDir, "/"), assetsDirWithBase = config.base + assetsDir, assetsHrefSelector = `[href^="${assetsDirWithBase}"]`, assetsSrcSelector = `[src^="${assetsDirWithBase}"]`, fakeScript = `
|
|
183
|
+
const distURL = pathToFileURL(config.build.outDir).href + "/", assetsDir = path.posix.join(config.build.assetsDir, "/"), assetsDirWithBase = config.base + assetsDir, assetsHrefSelector = `[href^="${assetsDirWithBase}"]`, assetsSrcSelector = `[src^="${assetsDirWithBase}"]`, fakeScript = `_VITE${Math.random().toString(36).slice(2, 10)}()`, globalDelete = /* @__PURE__ */ new Set(), globalDoNotDelete = /* @__PURE__ */ new Set(), globalRemoveDistFileNames = /* @__PURE__ */ new Set(), globalAssetsDataURL = {}, globalPublicFilesCache = {}, bundleAssetsNames = [], bundleHTMLNames = [];
|
|
184
184
|
for (const name in bundle) if (name.startsWith(assetsDir)) bundleAssetsNames.push(name);
|
|
185
185
|
else if (/\.html$/i.test(name)) bundleHTMLNames.push(name);
|
|
186
186
|
for (const htmlFileName of bundleHTMLNames) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-singlefile-compression",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"author": "bddjr",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Compress all assets and embeds them into dist/index.html, making it convenient to share as a single HTML file.",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@types/html-minifier-terser": ">=7.0.2",
|
|
93
93
|
"base128-ascii": ">=5.0.0",
|
|
94
94
|
"html-minifier-terser": ">=7.2.0",
|
|
95
|
-
"jsdom": "
|
|
95
|
+
"jsdom": "^29.1.0",
|
|
96
96
|
"mini-svg-data-uri": ">=1.4.4",
|
|
97
97
|
"mrmime": ">=2.0.1",
|
|
98
98
|
"picocolors": ">=1.1.1"
|