Skip to content

Commit

Permalink
Change TS module resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroborges committed Oct 15, 2024
1 parent a8d6706 commit dacbcb3
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 52 deletions.
4 changes: 2 additions & 2 deletions packages/svelte/test-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"module": "NodeNext",
"moduleResolution": "NodeNext"
"module": "ESNext",
"moduleResolution": "node"
},
"include": ["*.d.ts", "*.ts", "*.js", "**/*.d.ts", "**/*.ts", "**/*.js", "**/*.svelte", "*.config.js", "*.config.cjs"]
}
3 changes: 1 addition & 2 deletions playgrounds/svelte4/resources/js/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createInertiaApp } from '@inertiajs/svelte'
import type { ResolvedComponent } from '@inertiajs/svelte'
import { createInertiaApp, type ResolvedComponent } from '@inertiajs/svelte'

createInertiaApp({
resolve: (name) => {
Expand Down
3 changes: 1 addition & 2 deletions playgrounds/svelte4/resources/js/ssr.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createInertiaApp } from '@inertiajs/svelte'
import { createInertiaApp, type ResolvedComponent } from '@inertiajs/svelte'
import createServer from '@inertiajs/svelte/server'
import { ResolvedComponent } from '@inertiajs/svelte'

createServer((page) =>
createInertiaApp({
Expand Down
45 changes: 24 additions & 21 deletions playgrounds/svelte4/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
{
"extends": "@tsconfig/svelte/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"module": "NodeNext",
"moduleResolution": "NodeNext"
},
"include": [
"resources/**/*.d.ts",
"resources/**/*.ts",
"resources/**/*.js",
"resources/**/*.svelte",
"*.config.js",
"*.config.cjs"
]
"extends": "@tsconfig/svelte/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"module": "ESNext",
"moduleResolution": "node",
"paths": {
"@inertiajs/svelte/server": ["../../node_modules/@inertiajs/svelte/dist/server"]
}
},
"include": [
"resources/**/*.d.ts",
"resources/**/*.ts",
"resources/**/*.js",
"resources/**/*.svelte",
"*.config.js",
"*.config.cjs"
]
}
3 changes: 1 addition & 2 deletions playgrounds/svelte5/resources/js/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createInertiaApp } from '@inertiajs/svelte'
import { createInertiaApp, type ResolvedComponent } from '@inertiajs/svelte'
import { hydrate, mount } from 'svelte'
import type { ResolvedComponent } from '@inertiajs/svelte'

createInertiaApp({
resolve: (name) => {
Expand Down
3 changes: 1 addition & 2 deletions playgrounds/svelte5/resources/js/ssr.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createInertiaApp } from '@inertiajs/svelte'
import { createInertiaApp, type ResolvedComponent } from '@inertiajs/svelte'
import createServer from '@inertiajs/svelte/server'
import { ResolvedComponent } from '@inertiajs/svelte'

createServer((page) =>
createInertiaApp({
Expand Down
45 changes: 24 additions & 21 deletions playgrounds/svelte5/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
{
"extends": "@tsconfig/svelte/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"module": "NodeNext",
"moduleResolution": "NodeNext"
},
"include": [
"resources/**/*.d.ts",
"resources/**/*.ts",
"resources/**/*.js",
"resources/**/*.svelte",
"*.config.js",
"*.config.cjs"
]
"extends": "@tsconfig/svelte/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"module": "ESNext",
"moduleResolution": "node",
"paths": {
"@inertiajs/svelte/server": ["../../node_modules/@inertiajs/svelte/dist/server"]
}
},
"include": [
"resources/**/*.d.ts",
"resources/**/*.ts",
"resources/**/*.js",
"resources/**/*.svelte",
"*.config.js",
"*.config.cjs"
]
}

0 comments on commit dacbcb3

Please sign in to comment.