@tsrx/vite-plugin-vue 0.0.19 → 0.0.22
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/package.json +5 -4
- package/src/index.js +9 -1
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Vite plugin for @tsrx/vue (.tsrx modules)",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.22",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
@@ -20,16 +20,17 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tsrx/vue": "0.1.
|
|
23
|
+
"@tsrx/vue": "0.1.7"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"vite": "*"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"typescript": "^5.9.3",
|
|
30
|
-
"vite": "^8.0.
|
|
30
|
+
"vite": "^8.0.12",
|
|
31
31
|
"vue": "3.6.0-beta.10",
|
|
32
|
-
"vue-jsx-vapor": "^3.2.12"
|
|
32
|
+
"vue-jsx-vapor": "^3.2.12",
|
|
33
|
+
"@tsrx/core": "0.1.7"
|
|
33
34
|
},
|
|
34
35
|
"files": [
|
|
35
36
|
"src",
|
package/src/index.js
CHANGED
|
@@ -80,7 +80,15 @@ export function tsrxVue(options = {}) {
|
|
|
80
80
|
return { ...resolved, id: resolved.id + VIRTUAL_TSX_SUFFIX };
|
|
81
81
|
}
|
|
82
82
|
if (resolved) return resolved;
|
|
83
|
-
|
|
83
|
+
// Re-anchor the fallback virtual id to an absolute path so
|
|
84
|
+
// downstream import resolution walks `node_modules` from the
|
|
85
|
+
// real file's location rather than from workspace root —
|
|
86
|
+
// otherwise package deps declared inside
|
|
87
|
+
// `packages/<pkg>/node_modules` are invisible to vite.
|
|
88
|
+
const absoluteSource = isAbsolute(source)
|
|
89
|
+
? source
|
|
90
|
+
: pathResolve(rootDir, source.replace(/^\/+/, ''));
|
|
91
|
+
return absoluteSource + VIRTUAL_TSX_SUFFIX;
|
|
84
92
|
}
|
|
85
93
|
|
|
86
94
|
return null;
|