Skip to content

Commit 8c4732f

Browse files
authoredJun 1, 2024··
fix: tsconfigPath undefined (#491)
1 parent c042620 commit 8c4732f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

Diff for: ‎src/factory.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ export function antfu(
117117
}
118118
}
119119

120+
const typescriptOptions = resolveSubOptions(options, 'typescript')
121+
const tsconfigPath = 'tsconfigPath' in typescriptOptions ? typescriptOptions.tsconfigPath : undefined
122+
120123
// Base configs
121124
configs.push(
122125
ignores(),
@@ -145,7 +148,7 @@ export function antfu(
145148

146149
if (enableTypeScript) {
147150
configs.push(typescript({
148-
...resolveSubOptions(options, 'typescript'),
151+
...typescriptOptions,
149152
componentExts,
150153
overrides: getOverrides(options, 'typescript'),
151154
}))
@@ -182,14 +185,14 @@ export function antfu(
182185
if (enableReact) {
183186
configs.push(react({
184187
overrides: getOverrides(options, 'react'),
185-
tsconfigPath: getOverrides(options, 'typescript').tsconfigPath,
188+
tsconfigPath,
186189
}))
187190
}
188191

189192
if (enableSolid) {
190193
configs.push(solid({
191194
overrides: getOverrides(options, 'solid'),
192-
tsconfigPath: getOverrides(options, 'typescript').tsconfigPath,
195+
tsconfigPath,
193196
typescript: !!enableTypeScript,
194197
}))
195198
}

0 commit comments

Comments
 (0)
Please sign in to comment.