Skip to content

Commit 1df46d6

Browse files
chore: point example tsconfigs at the @solidjs/web JSX runtime
Sweep every example tsconfig from jsxImportSource "solid-js" to "@solidjs/web" (where the JSX types live in Solid 2.0), switch the remaining "node" moduleResolution settings to "bundler" so the jsx-runtime export subpath actually resolves, and import the JSX type from @solidjs/web in the vite-6/7/8 CounterContext (solid-js no longer exports it). Add a package exports subpath for vite-plugin-solid/virtual-solid-manifest so the ambient virtual-module types keep resolving under bundler resolution. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 220e849 commit 1df46d6

11 files changed

Lines changed: 36 additions & 19 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'vite-plugin-solid': patch
3+
---
4+
5+
Expose the `vite-plugin-solid/virtual-solid-manifest` ambient type
6+
declarations through a package `exports` subpath so
7+
`"types": ["vite-plugin-solid/virtual-solid-manifest"]` resolves under
8+
`moduleResolution: "bundler"` / `node16` too (previously only classic `node`
9+
resolution found the shipped `.d.ts`).

examples/css-matrix/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"allowSyntheticDefaultImports": true,
66
"esModuleInterop": true,
77
"resolveJsonModule": true,
8-
"moduleResolution": "node",
8+
"moduleResolution": "bundler",
99
"isolatedModules": true,
1010
"jsx": "preserve",
11-
"jsxImportSource": "solid-js",
11+
"jsxImportSource": "@solidjs/web",
1212
"types": ["vite/client", "vite-plugin-solid/virtual-solid-manifest"]
1313
}
1414
}

examples/ssr/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"allowSyntheticDefaultImports": true,
66
"esModuleInterop": true,
77
"resolveJsonModule": true,
8-
"moduleResolution": "node",
8+
"moduleResolution": "bundler",
99
"isolatedModules": true,
1010
"jsx": "preserve",
11-
"jsxImportSource": "solid-js",
11+
"jsxImportSource": "@solidjs/web",
1212
"types": ["vite/client", "vite-plugin-solid/virtual-solid-manifest"]
1313
}
1414
}

examples/turnkey/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"module": "ESNext",
55
"moduleResolution": "bundler",
66
"jsx": "preserve",
7-
"jsxImportSource": "solid-js",
7+
"jsxImportSource": "@solidjs/web",
88
"strict": true,
99
"skipLibCheck": true,
1010
"types": ["vite/client"]

examples/vite-6/src/CounterContext.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { createContext, createSignal, JSX, onSettled, useContext } from "solid-js";
1+
import { createContext, createSignal, onSettled, useContext } from "solid-js";
2+
import type { JSX } from "@solidjs/web";
23

34
interface CounterContext {
45
value(): number;

examples/vite-6/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"allowSyntheticDefaultImports": true,
66
"esModuleInterop": true,
77
"resolveJsonModule": true,
8-
"moduleResolution": "node",
8+
"moduleResolution": "bundler",
99
"jsx": "preserve",
10-
"jsxImportSource": "solid-js",
10+
"jsxImportSource": "@solidjs/web",
1111
"types": ["vite/client"],
1212
"baseUrl": ".",
1313
"paths": {

examples/vite-7/src/CounterContext.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { createContext, createSignal, JSX, onSettled, useContext } from "solid-js";
1+
import { createContext, createSignal, onSettled, useContext } from "solid-js";
2+
import type { JSX } from "@solidjs/web";
23

34
interface CounterContext {
45
value(): number;

examples/vite-7/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"allowSyntheticDefaultImports": true,
66
"esModuleInterop": true,
77
"resolveJsonModule": true,
8-
"moduleResolution": "node",
8+
"moduleResolution": "bundler",
99
"jsx": "preserve",
10-
"jsxImportSource": "solid-js",
10+
"jsxImportSource": "@solidjs/web",
1111
"types": ["vite/client"],
1212
"baseUrl": ".",
1313
"paths": {

examples/vite-8/src/CounterContext.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { createContext, createSignal, JSX, onSettled, useContext } from "solid-js";
1+
import { createContext, createSignal, onSettled, useContext } from "solid-js";
2+
import type { JSX } from "@solidjs/web";
23

34
interface CounterContext {
45
value(): number;

examples/vite-8/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"allowSyntheticDefaultImports": true,
66
"esModuleInterop": true,
77
"resolveJsonModule": true,
8-
"moduleResolution": "node",
8+
"moduleResolution": "bundler",
99
"jsx": "preserve",
10-
"jsxImportSource": "solid-js",
10+
"jsxImportSource": "@solidjs/web",
1111
"types": ["vite/client"],
1212
"baseUrl": ".",
1313
"paths": {

0 commit comments

Comments
 (0)