Skip to content

Commit f5ad53b

Browse files
committed
Change TS module resolution
1 parent 88a765b commit f5ad53b

File tree

7 files changed

+54
-52
lines changed

7 files changed

+54
-52
lines changed

packages/svelte/test-app/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"skipLibCheck": true,
1010
"sourceMap": true,
1111
"strict": true,
12-
"module": "NodeNext",
13-
"moduleResolution": "NodeNext"
12+
"module": "ESNext",
13+
"moduleResolution": "node"
1414
},
1515
"include": ["*.d.ts", "*.ts", "*.js", "**/*.d.ts", "**/*.ts", "**/*.js", "**/*.svelte", "*.config.js", "*.config.cjs"]
1616
}

playgrounds/svelte4/resources/js/app.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { createInertiaApp } from '@inertiajs/svelte'
2-
import type { ResolvedComponent } from '@inertiajs/svelte'
1+
import { createInertiaApp, type ResolvedComponent } from '@inertiajs/svelte'
32

43
createInertiaApp({
54
resolve: (name) => {

playgrounds/svelte4/resources/js/ssr.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { createInertiaApp } from '@inertiajs/svelte'
1+
import { createInertiaApp, type ResolvedComponent } from '@inertiajs/svelte'
22
import createServer from '@inertiajs/svelte/server'
3-
import { ResolvedComponent } from '@inertiajs/svelte'
43

54
createServer((page) =>
65
createInertiaApp({

playgrounds/svelte4/tsconfig.json

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
{
2-
"extends": "@tsconfig/svelte/tsconfig.json",
3-
"compilerOptions": {
4-
"allowJs": true,
5-
"checkJs": true,
6-
"esModuleInterop": true,
7-
"forceConsistentCasingInFileNames": true,
8-
"resolveJsonModule": true,
9-
"skipLibCheck": true,
10-
"sourceMap": true,
11-
"strict": true,
12-
"module": "NodeNext",
13-
"moduleResolution": "NodeNext"
14-
},
15-
"include": [
16-
"resources/**/*.d.ts",
17-
"resources/**/*.ts",
18-
"resources/**/*.js",
19-
"resources/**/*.svelte",
20-
"*.config.js",
21-
"*.config.cjs"
22-
]
2+
"extends": "@tsconfig/svelte/tsconfig.json",
3+
"compilerOptions": {
4+
"allowJs": true,
5+
"checkJs": true,
6+
"esModuleInterop": true,
7+
"forceConsistentCasingInFileNames": true,
8+
"resolveJsonModule": true,
9+
"skipLibCheck": true,
10+
"sourceMap": true,
11+
"strict": true,
12+
"module": "ESNext",
13+
"moduleResolution": "node",
14+
"paths": {
15+
"@inertiajs/svelte/server": ["../../node_modules/@inertiajs/svelte/dist/server"]
16+
}
17+
},
18+
"include": [
19+
"resources/**/*.d.ts",
20+
"resources/**/*.ts",
21+
"resources/**/*.js",
22+
"resources/**/*.svelte",
23+
"*.config.js",
24+
"*.config.cjs"
25+
]
2326
}

playgrounds/svelte5/resources/js/app.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { createInertiaApp } from '@inertiajs/svelte'
1+
import { createInertiaApp, type ResolvedComponent } from '@inertiajs/svelte'
22
import { hydrate, mount } from 'svelte'
3-
import type { ResolvedComponent } from '@inertiajs/svelte'
43

54
createInertiaApp({
65
resolve: (name) => {

playgrounds/svelte5/resources/js/ssr.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { createInertiaApp } from '@inertiajs/svelte'
1+
import { createInertiaApp, type ResolvedComponent } from '@inertiajs/svelte'
22
import createServer from '@inertiajs/svelte/server'
3-
import { ResolvedComponent } from '@inertiajs/svelte'
43

54
createServer((page) =>
65
createInertiaApp({

playgrounds/svelte5/tsconfig.json

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
{
2-
"extends": "@tsconfig/svelte/tsconfig.json",
3-
"compilerOptions": {
4-
"allowJs": true,
5-
"checkJs": true,
6-
"esModuleInterop": true,
7-
"forceConsistentCasingInFileNames": true,
8-
"resolveJsonModule": true,
9-
"skipLibCheck": true,
10-
"sourceMap": true,
11-
"strict": true,
12-
"module": "NodeNext",
13-
"moduleResolution": "NodeNext"
14-
},
15-
"include": [
16-
"resources/**/*.d.ts",
17-
"resources/**/*.ts",
18-
"resources/**/*.js",
19-
"resources/**/*.svelte",
20-
"*.config.js",
21-
"*.config.cjs"
22-
]
2+
"extends": "@tsconfig/svelte/tsconfig.json",
3+
"compilerOptions": {
4+
"allowJs": true,
5+
"checkJs": true,
6+
"esModuleInterop": true,
7+
"forceConsistentCasingInFileNames": true,
8+
"resolveJsonModule": true,
9+
"skipLibCheck": true,
10+
"sourceMap": true,
11+
"strict": true,
12+
"module": "ESNext",
13+
"moduleResolution": "node",
14+
"paths": {
15+
"@inertiajs/svelte/server": ["../../node_modules/@inertiajs/svelte/dist/server"]
16+
}
17+
},
18+
"include": [
19+
"resources/**/*.d.ts",
20+
"resources/**/*.ts",
21+
"resources/**/*.js",
22+
"resources/**/*.svelte",
23+
"*.config.js",
24+
"*.config.cjs"
25+
]
2326
}

0 commit comments

Comments
 (0)