@vizejs/nuxt 0.264.0 → 0.267.0
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.d.mts +1 -0
- package/dist/index.mjs +24 -0
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -416,6 +416,28 @@ function appendMuseaArtComponentIgnore(dirs) {
|
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
//#endregion
|
|
419
|
+
//#region src/musea-static.ts
|
|
420
|
+
function registerNuxtMuseaStaticPublicAsset(nuxt, basePath) {
|
|
421
|
+
nuxt.hook("nitro:config", (nitroConfig) => {
|
|
422
|
+
nitroConfig.publicAssets = [...nitroConfig.publicAssets ?? [], resolveNuxtMuseaStaticPublicAsset(nuxt.options.rootDir, nuxt.options.buildDir, basePath)];
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
function resolveNuxtMuseaStaticPublicAsset(rootDir, buildDir, basePath) {
|
|
426
|
+
const staticRoot = museaStaticRootFromBasePath(basePath);
|
|
427
|
+
const resolvedBuildDir = path.isAbsolute(buildDir) ? buildDir : path.resolve(rootDir, buildDir);
|
|
428
|
+
return {
|
|
429
|
+
dir: path.join(resolvedBuildDir, "dist", "client", staticRoot),
|
|
430
|
+
baseURL: normalizeMuseaBasePath(basePath)
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
function museaStaticRootFromBasePath(basePath) {
|
|
434
|
+
return basePath.replace(/^\/+|\/+$/g, "");
|
|
435
|
+
}
|
|
436
|
+
function normalizeMuseaBasePath(basePath) {
|
|
437
|
+
const normalized = basePath.replace(/^\/+|\/+$/g, "");
|
|
438
|
+
return normalized ? `/${normalized}` : "/";
|
|
439
|
+
}
|
|
440
|
+
//#endregion
|
|
419
441
|
//#region src/utils.ts
|
|
420
442
|
const NUXT_OG_IMAGE_RENDERER_SFC_EXCLUDE = /\.takumi\.vue(?:\?|$)/;
|
|
421
443
|
function normalizeUrlPrefix(value) {
|
|
@@ -1044,8 +1066,10 @@ async function setupVizeNuxtModule(options, nuxt) {
|
|
|
1044
1066
|
const { musea } = await import("@vizejs/vite-plugin-musea");
|
|
1045
1067
|
const museaBasePath = "basePath" in museaOptions ? museaOptions.basePath : "/__musea__";
|
|
1046
1068
|
(nuxt.options.vite ||= {}).plugins ||= [];
|
|
1069
|
+
registerNuxtMuseaStaticPublicAsset(nuxt, museaBasePath);
|
|
1047
1070
|
const museaConfig = {
|
|
1048
1071
|
projectRoot: nuxt.options.rootDir,
|
|
1072
|
+
vueVersion,
|
|
1049
1073
|
...museaOptions
|
|
1050
1074
|
};
|
|
1051
1075
|
nuxt.options.vite.plugins.push(...musea(museaConfig));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.267.0",
|
|
4
4
|
"description": "Nuxt module for Vize - compiler, musea gallery, linter, and type checker",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@nuxt/kit": "3.11.2",
|
|
45
|
-
"@vizejs/vite-plugin": "0.
|
|
46
|
-
"@vizejs/vite-plugin-musea": "0.
|
|
47
|
-
"vize": "0.
|
|
45
|
+
"@vizejs/vite-plugin": "0.267.0",
|
|
46
|
+
"@vizejs/vite-plugin-musea": "0.267.0",
|
|
47
|
+
"vize": "0.267.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"typescript": "6.0.3",
|