Skip to content

Commit fa62bc2

Browse files
committed
fix: tsConfigPaths reading wrong files and erroring
1 parent 2b24343 commit fa62bc2

File tree

10 files changed

+12
-18
lines changed

10 files changed

+12
-18
lines changed

e2e/adapters-e2e/vite.config.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,9 @@ errorOnDuplicatesPkgDeps(devDependencies, dependencies);
2020
* Note that Vite normally starts from `index.html` but the qwikCity plugin makes start at
2121
* `src/entry.ssr.tsx` instead.
2222
*/
23-
export default defineConfig(({ command, mode }): UserConfig => {
23+
export default defineConfig((): UserConfig => {
2424
return {
25-
plugins: [
26-
qwikCity(),
27-
qwikVite(),
28-
tsconfigPaths({
29-
root: '.',
30-
}),
31-
],
25+
plugins: [qwikCity(), qwikVite(), tsconfigPaths({ root: '.' })],
3226
// This tells Vite which dependencies to pre-build in dev mode.
3327
optimizeDeps: {
3428
// Put problematic deps that break bundling here, mostly those with binaries.

e2e/qwik-cli-e2e/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (process.env.CI) {
2626
}
2727

2828
export default defineConfig({
29-
plugins: [tsconfigPaths({ ignoreConfigErrors: true, root: '../../' })],
29+
plugins: [tsconfigPaths({ root: '../../' })],
3030
test: {
3131
include: ['./tests/*.spec.?(c|m)[jt]s?(x)'],
3232
setupFiles: ['./utils/setup.ts'],

packages/docs/src/routes/docs/(qwik)/advanced/custom-build-dir/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default defineConfig(() => {
7272
outDir: 'resources/', // This is the right setting
7373
},
7474
}),
75-
tsconfigPaths(),
75+
tsconfigPaths({ root: '.' }),
7676
],
7777
};
7878
});

packages/docs/src/routes/docs/(qwik)/advanced/vite/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import tsconfigPaths from 'vite-tsconfig-paths';
3737

3838
export default defineConfig(() => {
3939
return {
40-
plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
40+
plugins: [qwikCity(), qwikVite(), tsconfigPaths({ root: '.' })],
4141
};
4242
});
4343
```

packages/docs/src/routes/docs/integrations/authjs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ When migrating from `@builder.io/qwik-auth` to `@auth/qwik`, there are a couple
110110
```diff
111111
export default defineConfig(({ command, mode }): UserConfig => {
112112
return {
113-
plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
113+
plugins: [qwikCity(), qwikVite(), tsconfigPaths({ root: '.' })],
114114
// This tells Vite which dependencies to pre-build in dev mode.
115115
optimizeDeps: {
116116
include: ["@auth/qwik"],

packages/insights/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default defineConfig(async () => {
1414
qwikCity(),
1515
qwikTypes(),
1616
qwikVite(),
17-
tsconfigPaths({ projects: ['.'] }),
17+
tsconfigPaths({ root: '.' }),
1818
qwikInsights({ publicApiKey: loadEnv('', '.', '').PUBLIC_QWIK_INSIGHTS_KEY }),
1919
tailwindcss(),
2020
],

packages/insights/vitest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineConfig } from 'vitest/config';
22
import tsconfigPaths from 'vite-tsconfig-paths';
33

44
export default defineConfig({
5-
plugins: [tsconfigPaths({ ignoreConfigErrors: true })],
5+
plugins: [tsconfigPaths({ root: '.' })],
66
test: {
77
include: ['**/*.unit.?(c|m)[jt]s?(x)'],
88
setupFiles: ['../../vitest-setup.ts'],

starters/apps/base/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ errorOnDuplicatesPkgDeps(devDependencies, dependencies);
2121
*/
2222
export default defineConfig(({ command, mode }): UserConfig => {
2323
return {
24-
plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
24+
plugins: [qwikCity(), qwikVite(), tsconfigPaths({ root: "." })],
2525
// This tells Vite which dependencies to pre-build in dev mode.
2626
optimizeDeps: {
2727
// Put problematic deps that break bundling here, mostly those with binaries.

starters/apps/library/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ export default defineConfig(() => {
3030
],
3131
},
3232
},
33-
plugins: [qwikVite(), tsconfigPaths()],
33+
plugins: [qwikVite(), tsconfigPaths({ root: "." })],
3434
};
3535
});

starters/apps/preloader-test/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ function createBulkPlugin(): Plugin {
6060
};
6161
}
6262

63-
export default defineConfig(({ command, mode }): UserConfig => {
63+
export default defineConfig((): UserConfig => {
6464
return {
6565
plugins: [
6666
qwikCity(),
6767
qwikVite({ debug: true }),
6868
createBulkPlugin(),
69-
tsconfigPaths(),
69+
tsconfigPaths({ root: "." }),
7070
basicSsl(),
7171
],
7272
build: {

0 commit comments

Comments
 (0)