@mgz-app/viteforge 1.1.2 → 1.1.3
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.cjs +20 -15
- package/dist/index.mjs +20 -15
- package/dist/plugins/base64-assets.d.ts.map +1 -1
- package/dist/plugins/index.cjs +20 -15
- package/dist/plugins/index.mjs +20 -15
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2294,7 +2294,6 @@ function injectNoncePlugin(options = {}) {
|
|
|
2294
2294
|
}
|
|
2295
2295
|
var require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
2296
2296
|
var MIME_TYPES = {
|
|
2297
|
-
// 3d models
|
|
2298
2297
|
".glb": "model/gltf-binary",
|
|
2299
2298
|
".gltf": "model/gltf+json",
|
|
2300
2299
|
".fbx": "application/octet-stream",
|
|
@@ -2304,7 +2303,6 @@ var MIME_TYPES = {
|
|
|
2304
2303
|
".dae": "model/vnd.collada+xml",
|
|
2305
2304
|
".3ds": "application/x-3ds",
|
|
2306
2305
|
".usdz": "model/vnd.usdz+zip",
|
|
2307
|
-
// images
|
|
2308
2306
|
".png": "image/png",
|
|
2309
2307
|
".jpg": "image/jpeg",
|
|
2310
2308
|
".jpeg": "image/jpeg",
|
|
@@ -2320,14 +2318,12 @@ var MIME_TYPES = {
|
|
|
2320
2318
|
".basis": "application/octet-stream",
|
|
2321
2319
|
".ico": "image/x-icon",
|
|
2322
2320
|
".avif": "image/avif",
|
|
2323
|
-
// video
|
|
2324
2321
|
".mp4": "video/mp4",
|
|
2325
2322
|
".webm": "video/webm",
|
|
2326
|
-
".ogg": "
|
|
2323
|
+
".ogg": "audio/ogg",
|
|
2327
2324
|
".mov": "video/quicktime",
|
|
2328
2325
|
".avi": "video/x-msvideo",
|
|
2329
2326
|
".mkv": "video/x-matroska",
|
|
2330
|
-
// audio
|
|
2331
2327
|
".mp3": "audio/mpeg",
|
|
2332
2328
|
".wav": "audio/wav",
|
|
2333
2329
|
".flac": "audio/flac",
|
|
@@ -2335,27 +2331,36 @@ var MIME_TYPES = {
|
|
|
2335
2331
|
".m4a": "audio/mp4",
|
|
2336
2332
|
".opus": "audio/opus",
|
|
2337
2333
|
".weba": "audio/webm",
|
|
2338
|
-
// fonts
|
|
2339
2334
|
".ttf": "font/ttf",
|
|
2340
2335
|
".otf": "font/otf",
|
|
2341
2336
|
".woff": "font/woff",
|
|
2342
2337
|
".woff2": "font/woff2",
|
|
2343
|
-
// binary/data
|
|
2344
2338
|
".wasm": "application/wasm",
|
|
2345
2339
|
".bin": "application/octet-stream",
|
|
2346
2340
|
".img": "application/octet-stream",
|
|
2347
2341
|
".dat": "application/octet-stream",
|
|
2348
|
-
".raw": "application/octet-stream"
|
|
2349
|
-
// LUTs
|
|
2350
|
-
".cube": "application/octet-stream",
|
|
2351
|
-
".3dl": "application/octet-stream",
|
|
2352
|
-
".csp": "application/octet-stream",
|
|
2353
|
-
".lut": "application/octet-stream"
|
|
2342
|
+
".raw": "application/octet-stream"
|
|
2354
2343
|
};
|
|
2344
|
+
var AUTO_INLINE = /* @__PURE__ */ new Set([
|
|
2345
|
+
".glb",
|
|
2346
|
+
".gltf",
|
|
2347
|
+
".fbx",
|
|
2348
|
+
".obj",
|
|
2349
|
+
".png",
|
|
2350
|
+
".jpeg",
|
|
2351
|
+
".jpg",
|
|
2352
|
+
".gif",
|
|
2353
|
+
".webm",
|
|
2354
|
+
".mp4",
|
|
2355
|
+
".mp3",
|
|
2356
|
+
".ogg",
|
|
2357
|
+
".wav",
|
|
2358
|
+
".ttf",
|
|
2359
|
+
".otf"
|
|
2360
|
+
]);
|
|
2355
2361
|
function lookupMime(ext) {
|
|
2356
2362
|
return MIME_TYPES[ext.toLowerCase()] || "application/octet-stream";
|
|
2357
2363
|
}
|
|
2358
|
-
var ALLOWED_EXTENSIONS = new Set(Object.keys(MIME_TYPES));
|
|
2359
2364
|
function base64AssetPlugin() {
|
|
2360
2365
|
return {
|
|
2361
2366
|
name: "vite-base64-assets",
|
|
@@ -2408,7 +2413,7 @@ function base64AssetPlugin() {
|
|
|
2408
2413
|
const encoded = encodeURIComponent(optimized.data).replace(/'/g, "%27").replace(/"/g, "%22");
|
|
2409
2414
|
return `export default "data:image/svg+xml;charset=utf-8,${encoded}"`;
|
|
2410
2415
|
}
|
|
2411
|
-
if (
|
|
2416
|
+
if (AUTO_INLINE.has(extension)) {
|
|
2412
2417
|
const mimeType = lookupMime(extension);
|
|
2413
2418
|
const fileBuffer = fs5__default.default.readFileSync(cleanId);
|
|
2414
2419
|
return `export default "data:${mimeType};base64,${fileBuffer.toString("base64")}"`;
|
package/dist/index.mjs
CHANGED
|
@@ -2286,7 +2286,6 @@ function injectNoncePlugin(options = {}) {
|
|
|
2286
2286
|
}
|
|
2287
2287
|
var require2 = createRequire(import.meta.url);
|
|
2288
2288
|
var MIME_TYPES = {
|
|
2289
|
-
// 3d models
|
|
2290
2289
|
".glb": "model/gltf-binary",
|
|
2291
2290
|
".gltf": "model/gltf+json",
|
|
2292
2291
|
".fbx": "application/octet-stream",
|
|
@@ -2296,7 +2295,6 @@ var MIME_TYPES = {
|
|
|
2296
2295
|
".dae": "model/vnd.collada+xml",
|
|
2297
2296
|
".3ds": "application/x-3ds",
|
|
2298
2297
|
".usdz": "model/vnd.usdz+zip",
|
|
2299
|
-
// images
|
|
2300
2298
|
".png": "image/png",
|
|
2301
2299
|
".jpg": "image/jpeg",
|
|
2302
2300
|
".jpeg": "image/jpeg",
|
|
@@ -2312,14 +2310,12 @@ var MIME_TYPES = {
|
|
|
2312
2310
|
".basis": "application/octet-stream",
|
|
2313
2311
|
".ico": "image/x-icon",
|
|
2314
2312
|
".avif": "image/avif",
|
|
2315
|
-
// video
|
|
2316
2313
|
".mp4": "video/mp4",
|
|
2317
2314
|
".webm": "video/webm",
|
|
2318
|
-
".ogg": "
|
|
2315
|
+
".ogg": "audio/ogg",
|
|
2319
2316
|
".mov": "video/quicktime",
|
|
2320
2317
|
".avi": "video/x-msvideo",
|
|
2321
2318
|
".mkv": "video/x-matroska",
|
|
2322
|
-
// audio
|
|
2323
2319
|
".mp3": "audio/mpeg",
|
|
2324
2320
|
".wav": "audio/wav",
|
|
2325
2321
|
".flac": "audio/flac",
|
|
@@ -2327,27 +2323,36 @@ var MIME_TYPES = {
|
|
|
2327
2323
|
".m4a": "audio/mp4",
|
|
2328
2324
|
".opus": "audio/opus",
|
|
2329
2325
|
".weba": "audio/webm",
|
|
2330
|
-
// fonts
|
|
2331
2326
|
".ttf": "font/ttf",
|
|
2332
2327
|
".otf": "font/otf",
|
|
2333
2328
|
".woff": "font/woff",
|
|
2334
2329
|
".woff2": "font/woff2",
|
|
2335
|
-
// binary/data
|
|
2336
2330
|
".wasm": "application/wasm",
|
|
2337
2331
|
".bin": "application/octet-stream",
|
|
2338
2332
|
".img": "application/octet-stream",
|
|
2339
2333
|
".dat": "application/octet-stream",
|
|
2340
|
-
".raw": "application/octet-stream"
|
|
2341
|
-
// LUTs
|
|
2342
|
-
".cube": "application/octet-stream",
|
|
2343
|
-
".3dl": "application/octet-stream",
|
|
2344
|
-
".csp": "application/octet-stream",
|
|
2345
|
-
".lut": "application/octet-stream"
|
|
2334
|
+
".raw": "application/octet-stream"
|
|
2346
2335
|
};
|
|
2336
|
+
var AUTO_INLINE = /* @__PURE__ */ new Set([
|
|
2337
|
+
".glb",
|
|
2338
|
+
".gltf",
|
|
2339
|
+
".fbx",
|
|
2340
|
+
".obj",
|
|
2341
|
+
".png",
|
|
2342
|
+
".jpeg",
|
|
2343
|
+
".jpg",
|
|
2344
|
+
".gif",
|
|
2345
|
+
".webm",
|
|
2346
|
+
".mp4",
|
|
2347
|
+
".mp3",
|
|
2348
|
+
".ogg",
|
|
2349
|
+
".wav",
|
|
2350
|
+
".ttf",
|
|
2351
|
+
".otf"
|
|
2352
|
+
]);
|
|
2347
2353
|
function lookupMime(ext) {
|
|
2348
2354
|
return MIME_TYPES[ext.toLowerCase()] || "application/octet-stream";
|
|
2349
2355
|
}
|
|
2350
|
-
var ALLOWED_EXTENSIONS = new Set(Object.keys(MIME_TYPES));
|
|
2351
2356
|
function base64AssetPlugin() {
|
|
2352
2357
|
return {
|
|
2353
2358
|
name: "vite-base64-assets",
|
|
@@ -2400,7 +2405,7 @@ function base64AssetPlugin() {
|
|
|
2400
2405
|
const encoded = encodeURIComponent(optimized.data).replace(/'/g, "%27").replace(/"/g, "%22");
|
|
2401
2406
|
return `export default "data:image/svg+xml;charset=utf-8,${encoded}"`;
|
|
2402
2407
|
}
|
|
2403
|
-
if (
|
|
2408
|
+
if (AUTO_INLINE.has(extension)) {
|
|
2404
2409
|
const mimeType = lookupMime(extension);
|
|
2405
2410
|
const fileBuffer = fs5.readFileSync(cleanId);
|
|
2406
2411
|
return `export default "data:${mimeType};base64,${fileBuffer.toString("base64")}"`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base64-assets.d.ts","sourceRoot":"","sources":["../../src/plugins/base64-assets.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"base64-assets.d.ts","sourceRoot":"","sources":["../../src/plugins/base64-assets.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAkEnC,wBAAgB,iBAAiB,IAAI,MAAM,CAsE1C"}
|
package/dist/plugins/index.cjs
CHANGED
|
@@ -2290,7 +2290,6 @@ function injectNoncePlugin(options = {}) {
|
|
|
2290
2290
|
}
|
|
2291
2291
|
var require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
2292
2292
|
var MIME_TYPES = {
|
|
2293
|
-
// 3d models
|
|
2294
2293
|
".glb": "model/gltf-binary",
|
|
2295
2294
|
".gltf": "model/gltf+json",
|
|
2296
2295
|
".fbx": "application/octet-stream",
|
|
@@ -2300,7 +2299,6 @@ var MIME_TYPES = {
|
|
|
2300
2299
|
".dae": "model/vnd.collada+xml",
|
|
2301
2300
|
".3ds": "application/x-3ds",
|
|
2302
2301
|
".usdz": "model/vnd.usdz+zip",
|
|
2303
|
-
// images
|
|
2304
2302
|
".png": "image/png",
|
|
2305
2303
|
".jpg": "image/jpeg",
|
|
2306
2304
|
".jpeg": "image/jpeg",
|
|
@@ -2316,14 +2314,12 @@ var MIME_TYPES = {
|
|
|
2316
2314
|
".basis": "application/octet-stream",
|
|
2317
2315
|
".ico": "image/x-icon",
|
|
2318
2316
|
".avif": "image/avif",
|
|
2319
|
-
// video
|
|
2320
2317
|
".mp4": "video/mp4",
|
|
2321
2318
|
".webm": "video/webm",
|
|
2322
|
-
".ogg": "
|
|
2319
|
+
".ogg": "audio/ogg",
|
|
2323
2320
|
".mov": "video/quicktime",
|
|
2324
2321
|
".avi": "video/x-msvideo",
|
|
2325
2322
|
".mkv": "video/x-matroska",
|
|
2326
|
-
// audio
|
|
2327
2323
|
".mp3": "audio/mpeg",
|
|
2328
2324
|
".wav": "audio/wav",
|
|
2329
2325
|
".flac": "audio/flac",
|
|
@@ -2331,27 +2327,36 @@ var MIME_TYPES = {
|
|
|
2331
2327
|
".m4a": "audio/mp4",
|
|
2332
2328
|
".opus": "audio/opus",
|
|
2333
2329
|
".weba": "audio/webm",
|
|
2334
|
-
// fonts
|
|
2335
2330
|
".ttf": "font/ttf",
|
|
2336
2331
|
".otf": "font/otf",
|
|
2337
2332
|
".woff": "font/woff",
|
|
2338
2333
|
".woff2": "font/woff2",
|
|
2339
|
-
// binary/data
|
|
2340
2334
|
".wasm": "application/wasm",
|
|
2341
2335
|
".bin": "application/octet-stream",
|
|
2342
2336
|
".img": "application/octet-stream",
|
|
2343
2337
|
".dat": "application/octet-stream",
|
|
2344
|
-
".raw": "application/octet-stream"
|
|
2345
|
-
// LUTs
|
|
2346
|
-
".cube": "application/octet-stream",
|
|
2347
|
-
".3dl": "application/octet-stream",
|
|
2348
|
-
".csp": "application/octet-stream",
|
|
2349
|
-
".lut": "application/octet-stream"
|
|
2338
|
+
".raw": "application/octet-stream"
|
|
2350
2339
|
};
|
|
2340
|
+
var AUTO_INLINE = /* @__PURE__ */ new Set([
|
|
2341
|
+
".glb",
|
|
2342
|
+
".gltf",
|
|
2343
|
+
".fbx",
|
|
2344
|
+
".obj",
|
|
2345
|
+
".png",
|
|
2346
|
+
".jpeg",
|
|
2347
|
+
".jpg",
|
|
2348
|
+
".gif",
|
|
2349
|
+
".webm",
|
|
2350
|
+
".mp4",
|
|
2351
|
+
".mp3",
|
|
2352
|
+
".ogg",
|
|
2353
|
+
".wav",
|
|
2354
|
+
".ttf",
|
|
2355
|
+
".otf"
|
|
2356
|
+
]);
|
|
2351
2357
|
function lookupMime(ext) {
|
|
2352
2358
|
return MIME_TYPES[ext.toLowerCase()] || "application/octet-stream";
|
|
2353
2359
|
}
|
|
2354
|
-
var ALLOWED_EXTENSIONS = new Set(Object.keys(MIME_TYPES));
|
|
2355
2360
|
function base64AssetPlugin() {
|
|
2356
2361
|
return {
|
|
2357
2362
|
name: "vite-base64-assets",
|
|
@@ -2404,7 +2409,7 @@ function base64AssetPlugin() {
|
|
|
2404
2409
|
const encoded = encodeURIComponent(optimized.data).replace(/'/g, "%27").replace(/"/g, "%22");
|
|
2405
2410
|
return `export default "data:image/svg+xml;charset=utf-8,${encoded}"`;
|
|
2406
2411
|
}
|
|
2407
|
-
if (
|
|
2412
|
+
if (AUTO_INLINE.has(extension)) {
|
|
2408
2413
|
const mimeType = lookupMime(extension);
|
|
2409
2414
|
const fileBuffer = fs5__default.default.readFileSync(cleanId);
|
|
2410
2415
|
return `export default "data:${mimeType};base64,${fileBuffer.toString("base64")}"`;
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -2280,7 +2280,6 @@ function injectNoncePlugin(options = {}) {
|
|
|
2280
2280
|
}
|
|
2281
2281
|
var require2 = createRequire(import.meta.url);
|
|
2282
2282
|
var MIME_TYPES = {
|
|
2283
|
-
// 3d models
|
|
2284
2283
|
".glb": "model/gltf-binary",
|
|
2285
2284
|
".gltf": "model/gltf+json",
|
|
2286
2285
|
".fbx": "application/octet-stream",
|
|
@@ -2290,7 +2289,6 @@ var MIME_TYPES = {
|
|
|
2290
2289
|
".dae": "model/vnd.collada+xml",
|
|
2291
2290
|
".3ds": "application/x-3ds",
|
|
2292
2291
|
".usdz": "model/vnd.usdz+zip",
|
|
2293
|
-
// images
|
|
2294
2292
|
".png": "image/png",
|
|
2295
2293
|
".jpg": "image/jpeg",
|
|
2296
2294
|
".jpeg": "image/jpeg",
|
|
@@ -2306,14 +2304,12 @@ var MIME_TYPES = {
|
|
|
2306
2304
|
".basis": "application/octet-stream",
|
|
2307
2305
|
".ico": "image/x-icon",
|
|
2308
2306
|
".avif": "image/avif",
|
|
2309
|
-
// video
|
|
2310
2307
|
".mp4": "video/mp4",
|
|
2311
2308
|
".webm": "video/webm",
|
|
2312
|
-
".ogg": "
|
|
2309
|
+
".ogg": "audio/ogg",
|
|
2313
2310
|
".mov": "video/quicktime",
|
|
2314
2311
|
".avi": "video/x-msvideo",
|
|
2315
2312
|
".mkv": "video/x-matroska",
|
|
2316
|
-
// audio
|
|
2317
2313
|
".mp3": "audio/mpeg",
|
|
2318
2314
|
".wav": "audio/wav",
|
|
2319
2315
|
".flac": "audio/flac",
|
|
@@ -2321,27 +2317,36 @@ var MIME_TYPES = {
|
|
|
2321
2317
|
".m4a": "audio/mp4",
|
|
2322
2318
|
".opus": "audio/opus",
|
|
2323
2319
|
".weba": "audio/webm",
|
|
2324
|
-
// fonts
|
|
2325
2320
|
".ttf": "font/ttf",
|
|
2326
2321
|
".otf": "font/otf",
|
|
2327
2322
|
".woff": "font/woff",
|
|
2328
2323
|
".woff2": "font/woff2",
|
|
2329
|
-
// binary/data
|
|
2330
2324
|
".wasm": "application/wasm",
|
|
2331
2325
|
".bin": "application/octet-stream",
|
|
2332
2326
|
".img": "application/octet-stream",
|
|
2333
2327
|
".dat": "application/octet-stream",
|
|
2334
|
-
".raw": "application/octet-stream"
|
|
2335
|
-
// LUTs
|
|
2336
|
-
".cube": "application/octet-stream",
|
|
2337
|
-
".3dl": "application/octet-stream",
|
|
2338
|
-
".csp": "application/octet-stream",
|
|
2339
|
-
".lut": "application/octet-stream"
|
|
2328
|
+
".raw": "application/octet-stream"
|
|
2340
2329
|
};
|
|
2330
|
+
var AUTO_INLINE = /* @__PURE__ */ new Set([
|
|
2331
|
+
".glb",
|
|
2332
|
+
".gltf",
|
|
2333
|
+
".fbx",
|
|
2334
|
+
".obj",
|
|
2335
|
+
".png",
|
|
2336
|
+
".jpeg",
|
|
2337
|
+
".jpg",
|
|
2338
|
+
".gif",
|
|
2339
|
+
".webm",
|
|
2340
|
+
".mp4",
|
|
2341
|
+
".mp3",
|
|
2342
|
+
".ogg",
|
|
2343
|
+
".wav",
|
|
2344
|
+
".ttf",
|
|
2345
|
+
".otf"
|
|
2346
|
+
]);
|
|
2341
2347
|
function lookupMime(ext) {
|
|
2342
2348
|
return MIME_TYPES[ext.toLowerCase()] || "application/octet-stream";
|
|
2343
2349
|
}
|
|
2344
|
-
var ALLOWED_EXTENSIONS = new Set(Object.keys(MIME_TYPES));
|
|
2345
2350
|
function base64AssetPlugin() {
|
|
2346
2351
|
return {
|
|
2347
2352
|
name: "vite-base64-assets",
|
|
@@ -2394,7 +2399,7 @@ function base64AssetPlugin() {
|
|
|
2394
2399
|
const encoded = encodeURIComponent(optimized.data).replace(/'/g, "%27").replace(/"/g, "%22");
|
|
2395
2400
|
return `export default "data:image/svg+xml;charset=utf-8,${encoded}"`;
|
|
2396
2401
|
}
|
|
2397
|
-
if (
|
|
2402
|
+
if (AUTO_INLINE.has(extension)) {
|
|
2398
2403
|
const mimeType = lookupMime(extension);
|
|
2399
2404
|
const fileBuffer = fs5.readFileSync(cleanId);
|
|
2400
2405
|
return `export default "data:${mimeType};base64,${fileBuffer.toString("base64")}"`;
|