Visitar URL original
fix(scan): skip tsconfigRaw fallback if tsconfig is set (#13823) · vitejs/vite@b6155a1 · GitHub
Skip to content

Commit b6155a1

Browse files
authored
fix(scan): skip tsconfigRaw fallback if tsconfig is set (#13823)
1 parent e8880f0 commit b6155a1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/vite/src/node/optimizer

‎packages/vite/src/node/optimizer/scan.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ async function prepareEsbuildScanner(
207207

208208
const {
209209
plugins = [],
210+
tsconfig,
210211
tsconfigRaw,
211212
...esbuildOptions
212213
} = config.optimizeDeps?.esbuildOptions ?? {}
@@ -222,8 +223,9 @@ async function prepareEsbuildScanner(
222223
format: 'esm',
223224
logLevel: 'silent',
224225
plugins: [...plugins, plugin],
226+
tsconfig,
225227
tsconfigRaw:
226-
typeof tsconfigRaw === 'string'
228+
tsconfig || typeof tsconfigRaw === 'string'
227229
? tsconfigRaw
228230
: {
229231
...tsconfigRaw,

0 commit comments

Comments
 (0)