@vizejs/nuxt 0.277.0 → 0.279.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.mjs +6 -6
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -469,20 +469,20 @@ function mergeNuxtCompilerPatterns(defaultPattern, userPattern) {
|
|
|
469
469
|
return [defaultPattern, ...Array.isArray(userPattern) ? userPattern : [userPattern]];
|
|
470
470
|
}
|
|
471
471
|
function isVizeVirtualVueModuleId(id) {
|
|
472
|
-
return id.startsWith("\0") && /\.vue\.
|
|
472
|
+
return id.startsWith("\0") && /\.vue\.tsx?(?:\?|$)/.test(id);
|
|
473
473
|
}
|
|
474
474
|
function isVizeGeneratedVueModuleId(id) {
|
|
475
475
|
let normalized = id;
|
|
476
476
|
if (normalized.startsWith("/@id/__x00__")) normalized = normalized.slice(12);
|
|
477
477
|
else if (normalized.startsWith("__x00__")) normalized = normalized.slice(7);
|
|
478
|
-
return /\.vue\.
|
|
478
|
+
return /\.vue\.tsx?(?:\?|$)/.test(normalized);
|
|
479
479
|
}
|
|
480
480
|
/**
|
|
481
481
|
* Recognize raw `.jsx`/`.tsx` Vue component modules compiled by Vize.
|
|
482
482
|
*
|
|
483
483
|
* Unlike `.vue` files, JSX/TSX modules are transformed in place by the
|
|
484
484
|
* underlying Vite plugin (the original `.jsx`/`.tsx` id is preserved, no
|
|
485
|
-
* `\0`-prefixed `.vue.ts` virtual id is created). Nuxt's auto-import,
|
|
485
|
+
* `\0`-prefixed `.vue.ts[x]` virtual id is created). Nuxt's auto-import,
|
|
486
486
|
* component, and i18n transforms still need to run on these modules, so the
|
|
487
487
|
* Nuxt transform bridge keys off this predicate in addition to
|
|
488
488
|
* `isVizeGeneratedVueModuleId`.
|
|
@@ -494,17 +494,17 @@ function isVizeGeneratedVueModuleId(id) {
|
|
|
494
494
|
function isVizeJsxModuleId(id) {
|
|
495
495
|
const queryIndex = id.indexOf("?");
|
|
496
496
|
const pathPart = queryIndex === -1 ? id : id.slice(0, queryIndex);
|
|
497
|
-
if (!/\.(?:jsx|tsx)$/.test(pathPart)) return false;
|
|
497
|
+
if (/\.vue\.tsx?$/.test(pathPart) || !/\.(?:jsx|tsx)$/.test(pathPart)) return false;
|
|
498
498
|
if (queryIndex === -1) return true;
|
|
499
499
|
const params = new URLSearchParams(id.slice(queryIndex + 1));
|
|
500
500
|
return !(params.has("raw") || params.has("url") || params.has("worker") || params.has("sharedworker"));
|
|
501
501
|
}
|
|
502
502
|
function normalizeVizeVirtualVueModuleId(id) {
|
|
503
|
-
return (id.startsWith("\0vize-ssr:") ? id.slice(10) : id.slice(1)).replace(/\.
|
|
503
|
+
return (id.startsWith("\0vize-ssr:") ? id.slice(10) : id.slice(1)).replace(/\.tsx?(?=\?|$)/, "");
|
|
504
504
|
}
|
|
505
505
|
function normalizeVizeGeneratedVueModuleId(id) {
|
|
506
506
|
if (isVizeVirtualVueModuleId(id)) return normalizeVizeVirtualVueModuleId(id);
|
|
507
|
-
return id.replace(/^\/@id\/__x00__/, "").replace(/^__x00__/, "").replace(/\.
|
|
507
|
+
return id.replace(/^\/@id\/__x00__/, "").replace(/^__x00__/, "").replace(/\.tsx?(?=\?|$)/, "");
|
|
508
508
|
}
|
|
509
509
|
const NUXT_INJECTED_MARKER = "/* nuxt-injected */";
|
|
510
510
|
const NUXT_INJECTED_KEY_RE = /'\$[^']+'\s+\/\* nuxt-injected \*\//g;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.279.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.279.0",
|
|
46
|
+
"@vizejs/vite-plugin-musea": "0.279.0",
|
|
47
|
+
"vize": "0.279.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"typescript": "6.0.3",
|