Skip to content

Commit 3d385ff

Browse files
feat(svelte-query): Switch to moduleResolution bundler (#5471)
1 parent 3941ee1 commit 3d385ff

File tree

6 files changed

+12
-18
lines changed

6 files changed

+12
-18
lines changed

packages/svelte-query-devtools/tsconfig.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
{
22
"compilerOptions": {
3+
"allowImportingTsExtensions": true,
34
"allowJs": true,
45
"allowSyntheticDefaultImports": true,
56
"checkJs": true,
67
"esModuleInterop": true,
78
"forceConsistentCasingInFileNames": true,
89
"isolatedModules": true,
910
"lib": ["esnext", "DOM", "DOM.Iterable"],
10-
"moduleResolution": "node",
11+
"moduleResolution": "bundler",
1112
"module": "esnext",
1213
"noEmit": true,
13-
"noImplicitAny": true,
1414
"noImplicitReturns": true,
15-
"noImplicitThis": true,
1615
"noUncheckedIndexedAccess": true,
1716
"noUnusedLocals": true,
1817
"noUnusedParameters": true,
1918
"resolveJsonModule": true,
2019
"skipLibCheck": true,
2120
"sourceMap": true,
2221
"strict": true,
23-
"strictNullChecks": true,
2422
"target": "esnext"
2523
},
2624
"include": ["src/**/*.js", "src/**/*.ts", "src/**/*.svelte", ".eslintrc.cjs", "vite.config.ts"]
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
import { resolve } from 'node:path';
12
import { svelte } from '@sveltejs/vite-plugin-svelte';
2-
import path from 'path';
33
import { defineConfig } from 'vite';
44

55
export default defineConfig({
66
plugins: [svelte()],
77
resolve: {
88
alias: {
9-
"@tanstack/query-core": path.resolve(__dirname, '..', 'query-core', 'src'),
10-
"@tanstack/query-devtools": path.resolve(__dirname, '..', 'query-devtools', 'src'),
11-
"@tanstack/svelte-query": path.resolve(__dirname, '..', 'svelte-query', 'src'),
9+
"@tanstack/query-core": resolve(__dirname, '..', 'query-core', 'src'),
10+
"@tanstack/query-devtools": resolve(__dirname, '..', 'query-devtools', 'src'),
11+
"@tanstack/svelte-query": resolve(__dirname, '..', 'svelte-query', 'src'),
1212
}
1313
}
1414
});

packages/svelte-query/src/createBaseQuery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { QueryClient, QueryKey, QueryObserver } from '@tanstack/query-core'
1+
import { derived, get, readable, writable } from 'svelte/store'
22
import { notifyManager } from '@tanstack/query-core'
3+
import type { QueryClient, QueryKey, QueryObserver } from '@tanstack/query-core'
34
import type { CreateBaseQueryOptions, CreateBaseQueryResult } from './types'
45
import { useQueryClient } from './useQueryClient'
5-
import { derived, get, readable, writable } from 'svelte/store'
66
import { isWritable } from './utils'
77

88
export function createBaseQuery<

packages/svelte-query/src/createQueries.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ import type {
88
QueriesObserverOptions,
99
QueryObserverOptions,
1010
} from '@tanstack/query-core'
11-
1211
import { notifyManager, QueriesObserver } from '@tanstack/query-core'
1312
import { derived, get, readable, writable, type Readable } from 'svelte/store'
14-
1513
import type { WritableOrVal } from './types'
1614
import { useQueryClient } from './useQueryClient'
1715
import { isWritable } from './utils'

packages/svelte-query/tsconfig.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
{
22
"compilerOptions": {
3+
"allowImportingTsExtensions": true,
34
"allowJs": true,
45
"allowSyntheticDefaultImports": true,
56
"checkJs": true,
67
"esModuleInterop": true,
78
"forceConsistentCasingInFileNames": true,
89
"isolatedModules": true,
910
"lib": ["esnext", "DOM", "DOM.Iterable"],
10-
"moduleResolution": "node",
11+
"moduleResolution": "bundler",
1112
"module": "esnext",
1213
"noEmit": true,
13-
"noImplicitAny": true,
1414
"noImplicitReturns": true,
15-
"noImplicitThis": true,
1615
"noUncheckedIndexedAccess": true,
1716
"noUnusedLocals": true,
1817
"noUnusedParameters": true,
1918
"resolveJsonModule": true,
2019
"skipLibCheck": true,
2120
"sourceMap": true,
2221
"strict": true,
23-
"strictNullChecks": true,
2422
"target": "esnext",
2523
"types": ["vitest/globals", "@testing-library/jest-dom"]
2624
},

packages/svelte-query/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
import { resolve } from 'node:path';
12
import { svelte } from '@sveltejs/vite-plugin-svelte';
2-
import path from 'path';
33
import { defineConfig } from 'vite';
44

55
export default defineConfig({
66
plugins: [svelte()],
77
resolve: {
88
alias: {
9-
"@tanstack/query-core": path.resolve(__dirname, '..', 'query-core', 'src'),
9+
"@tanstack/query-core": resolve(__dirname, '..', 'query-core', 'src'),
1010
}
1111
},
1212
test: {

0 commit comments

Comments
 (0)