Skip to content

Commit 06b0007

Browse files
committed
fix: tsconfigPath undefined
1 parent 484deea commit 06b0007

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/index.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ export async function defineConfig(
129129
}
130130
}
131131

132+
const typescriptOptions = resolveSubOptions(options, 'typescript')
133+
const tsconfigPath = 'tsconfigPath' in typescriptOptions ? typescriptOptions.tsconfigPath : undefined
134+
132135
// Base configs
133136
configs.push(
134137
ignores(),
@@ -157,7 +160,7 @@ export async function defineConfig(
157160
if (enableTypeScript) {
158161
configs.push(
159162
typescript({
160-
...resolveSubOptions(options, 'typescript'),
163+
...typescriptOptions,
161164
componentExts,
162165
overrides: getOverrides(options, 'typescript'),
163166
}),
@@ -200,7 +203,7 @@ export async function defineConfig(
200203
configs.push(
201204
react({
202205
overrides: getOverrides(options, 'react'),
203-
tsconfigPath: (getOverrides(options, 'typescript') as any).tsconfigPath,
206+
tsconfigPath,
204207
}),
205208
)
206209
}

0 commit comments

Comments
 (0)