@vizejs/nuxt 0.428.1 → 0.429.1
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.mjs +15 -7
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -733,6 +733,17 @@ function escapeRegExp(char) {
|
|
|
733
733
|
return "\\^$+?.()|[]{}".includes(char) ? `\\${char}` : char;
|
|
734
734
|
}
|
|
735
735
|
//#endregion
|
|
736
|
+
//#region src/module-id.ts
|
|
737
|
+
/** Recognize compiled modules without assigning raw Vue/style queries to Vize. */
|
|
738
|
+
function isVizeGeneratedVueModuleId(id) {
|
|
739
|
+
const normalized = id.replace(/^\/@id\/__x00__|^__x00__/, "");
|
|
740
|
+
if (/\.vue\.tsx?(?:\?|$)/.test(normalized)) return true;
|
|
741
|
+
const queryIndex = normalized.indexOf("?");
|
|
742
|
+
if (queryIndex === -1 || !normalized.slice(0, queryIndex).endsWith(".vue")) return false;
|
|
743
|
+
const params = new URLSearchParams(normalized.slice(queryIndex + 1));
|
|
744
|
+
return params.has("vue") && (params.has("vize") || params.has("vize-ssr")) && !params.has("type");
|
|
745
|
+
}
|
|
746
|
+
//#endregion
|
|
736
747
|
//#region src/utils.ts
|
|
737
748
|
const NUXT_OG_IMAGE_RENDERER_SFC_EXCLUDE = /\.takumi\.vue(?:\?|$)|[?&]og-image-depth=/;
|
|
738
749
|
function normalizeUrlPrefix(value) {
|
|
@@ -766,12 +777,6 @@ function mergeNuxtCompilerPatterns(defaultPattern, userPattern) {
|
|
|
766
777
|
function isVizeVirtualVueModuleId(id) {
|
|
767
778
|
return id.startsWith("\0") && /\.vue\.tsx?(?:\?|$)/.test(id);
|
|
768
779
|
}
|
|
769
|
-
function isVizeGeneratedVueModuleId(id) {
|
|
770
|
-
let normalized = id;
|
|
771
|
-
if (normalized.startsWith("/@id/__x00__")) normalized = normalized.slice(12);
|
|
772
|
-
else if (normalized.startsWith("__x00__")) normalized = normalized.slice(7);
|
|
773
|
-
return /\.vue\.tsx?(?:\?|$)/.test(normalized);
|
|
774
|
-
}
|
|
775
780
|
/**
|
|
776
781
|
* Recognize raw `.jsx`/`.tsx` Vue component modules compiled by Vize.
|
|
777
782
|
*
|
|
@@ -1364,7 +1369,10 @@ async function setupVizeNuxtModule(options, nuxt) {
|
|
|
1364
1369
|
const { default: vize } = await import("@vizejs/vite-plugin");
|
|
1365
1370
|
nuxt.options.vite ||= {};
|
|
1366
1371
|
nuxt.options.vite.plugins = nuxt.options.vite.plugins || [];
|
|
1367
|
-
nuxt.options.vite.plugins.push(vize(
|
|
1372
|
+
nuxt.options.vite.plugins.push(vize({
|
|
1373
|
+
...compilerOptions,
|
|
1374
|
+
ssrModuleIdRoot: nuxt.options.srcDir
|
|
1375
|
+
}));
|
|
1368
1376
|
}
|
|
1369
1377
|
let isNuxtBuild = false;
|
|
1370
1378
|
let isViteBuild = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.429.1",
|
|
4
4
|
"description": "Nuxt module for Vize - compiler, musea gallery, linter, and type checker",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@nuxt/kit": "3.11.2",
|
|
52
|
-
"@vizejs/native": "0.
|
|
53
|
-
"@vizejs/nuxt-lint-config": "0.
|
|
54
|
-
"@vizejs/vite-plugin": "0.
|
|
55
|
-
"@vizejs/vite-plugin-musea": "0.
|
|
56
|
-
"oxlint-plugin-vize": "0.
|
|
57
|
-
"vize": "0.
|
|
52
|
+
"@vizejs/native": "0.429.1",
|
|
53
|
+
"@vizejs/nuxt-lint-config": "0.429.1",
|
|
54
|
+
"@vizejs/vite-plugin": "0.429.1",
|
|
55
|
+
"@vizejs/vite-plugin-musea": "0.429.1",
|
|
56
|
+
"oxlint-plugin-vize": "0.429.1",
|
|
57
|
+
"vize": "0.429.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"jiti-nuxt2": "npm:jiti@1.21.7",
|