@tsrx/vite-plugin-solid 0.0.32 → 0.0.35

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.
Files changed (2) hide show
  1. package/package.json +5 -4
  2. package/src/index.js +9 -2
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Vite plugin for @tsrx/solid (.tsrx modules) targeting Solid 2.0",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.0.32",
6
+ "version": "0.0.35",
7
7
  "type": "module",
8
8
  "publishConfig": {
9
9
  "access": "public"
@@ -20,7 +20,7 @@
20
20
  }
21
21
  },
22
22
  "dependencies": {
23
- "@tsrx/solid": "0.1.3"
23
+ "@tsrx/solid": "0.1.6"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "vite": "*"
@@ -28,8 +28,9 @@
28
28
  "devDependencies": {
29
29
  "solid-js": "2.0.0-beta.7",
30
30
  "typescript": "^5.9.3",
31
- "vite": "^8.0.0",
32
- "vite-plugin-solid": "3.0.0-next.5"
31
+ "vite": "^8.0.12",
32
+ "vite-plugin-solid": "3.0.0-next.5",
33
+ "@tsrx/core": "0.1.6"
33
34
  },
34
35
  "files": [
35
36
  "src",
package/src/index.js CHANGED
@@ -97,8 +97,15 @@ export function tsrxSolid(options = {}) {
97
97
  // Fallback: when `this.resolve` can't resolve (e.g. an absolute
98
98
  // path coming in as a root entry such as a vitest test file),
99
99
  // still rewrite to the virtual `.tsx` id directly so `load`
100
- // can read the real file.
101
- return source + VIRTUAL_TSX_SUFFIX;
100
+ // can read the real file. Re-anchor the virtual id to an
101
+ // absolute path so downstream import resolution walks the
102
+ // correct `node_modules` chain — leaving it relative makes
103
+ // vite walk up from the workspace root and miss package
104
+ // dependencies declared inside `packages/<pkg>/node_modules`.
105
+ const absolute_source = isAbsolute(source)
106
+ ? source
107
+ : path_resolve(root_dir, source.replace(/^\/+/, ''));
108
+ return absolute_source + VIRTUAL_TSX_SUFFIX;
102
109
  }
103
110
  return null;
104
111
  },