@tsrx/vite-plugin-solid 0.0.80 → 0.0.82
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 +4 -4
- package/src/index.js +26 -0
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.
|
|
6
|
+
"version": "0.0.82",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tsrx/
|
|
23
|
+
"@tsrx/core": "0.1.52",
|
|
24
|
+
"@tsrx/solid": "0.1.52"
|
|
24
25
|
},
|
|
25
26
|
"peerDependencies": {
|
|
26
27
|
"vite": "*"
|
|
@@ -30,8 +31,7 @@
|
|
|
30
31
|
"solid-js": "2.0.0-beta.15",
|
|
31
32
|
"typescript": "^5.9.3",
|
|
32
33
|
"vite": "^8.1.5",
|
|
33
|
-
"vite-plugin-solid": "3.0.0-next.5"
|
|
34
|
-
"@tsrx/core": "0.1.50"
|
|
34
|
+
"vite-plugin-solid": "3.0.0-next.5"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"src",
|
package/src/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { readFile } from 'node:fs/promises';
|
|
|
4
4
|
import { existsSync } from 'node:fs';
|
|
5
5
|
import { resolve as path_resolve, isAbsolute } from 'node:path';
|
|
6
6
|
import { compile } from '@tsrx/solid';
|
|
7
|
+
import { createDepScanLoadPlugin } from '@tsrx/core/vite/dep-scan';
|
|
7
8
|
|
|
8
9
|
const DEFAULT_TSRX_PATTERN = /\.tsrx$/;
|
|
9
10
|
const VIRTUAL_TSX_SUFFIX = '.tsx';
|
|
@@ -74,6 +75,31 @@ export function tsrxSolid(options = {}) {
|
|
|
74
75
|
name: '@tsrx/vite-plugin-solid',
|
|
75
76
|
enforce: 'pre',
|
|
76
77
|
|
|
78
|
+
config() {
|
|
79
|
+
return {
|
|
80
|
+
optimizeDeps: {
|
|
81
|
+
rolldownOptions: {
|
|
82
|
+
// The scan runs its own jsx transform over the tsx the
|
|
83
|
+
// dep-scan plugin hands back, and it defaults to react's
|
|
84
|
+
// automatic runtime — which no Solid project has installed,
|
|
85
|
+
// so the scan would fail on an unresolvable
|
|
86
|
+
// `react/jsx-dev-runtime`. Solid's own jsx handling belongs
|
|
87
|
+
// to `vite-plugin-solid` downstream; the scan only needs the
|
|
88
|
+
// imports, so leave the jsx alone.
|
|
89
|
+
transform: { jsx: 'preserve' },
|
|
90
|
+
plugins: [
|
|
91
|
+
createDepScanLoadPlugin({
|
|
92
|
+
name: '@tsrx/vite-plugin-solid:dep-scan',
|
|
93
|
+
isVirtual: is_virtual,
|
|
94
|
+
toRealPath: to_real_path,
|
|
95
|
+
compile,
|
|
96
|
+
}),
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
|
|
77
103
|
configResolved(config) {
|
|
78
104
|
root_dir = config.root;
|
|
79
105
|
},
|