@@ -2,9 +2,9 @@ import path from 'node:path'
22import process from 'node:process'
33import {
44 getTsconfig ,
5- parseTsconfig ,
6- type TsConfigJson ,
7- type TsConfigJsonResolved ,
5+ readTsconfig ,
6+ type TsconfigJson ,
7+ type TsconfigJsonResolved ,
88} from 'get-tsconfig'
99import type { IsolatedDeclarationsOptions } from 'rolldown/experimental'
1010
@@ -59,14 +59,14 @@ export interface GeneralOptions {
5959 *
6060 * @see https://www.typescriptlang.org/tsconfig
6161 */
62- tsconfigRaw ?: Omit < TsConfigJson , 'compilerOptions' >
62+ tsconfigRaw ?: Omit < TsconfigJson , 'compilerOptions' >
6363
6464 /**
6565 * Override the `compilerOptions` specified in `tsconfig.json`.
6666 *
6767 * @see https://www.typescriptlang.org/tsconfig/#compilerOptions
6868 */
69- compilerOptions ?: TsConfigJson . CompilerOptions
69+ compilerOptions ?: TsconfigJson . CompilerOptions
7070
7171 /**
7272 * If `true`, the plugin will generate declaration maps (`.d.ts.map`) for `.d.ts` files.
@@ -242,7 +242,7 @@ export type OptionsResolved = Overwrite<
242242 entry ?: string [ ]
243243 tsconfig ?: string
244244 oxc : IsolatedDeclarationsOptions | false
245- tsconfigRaw : TsConfigJson
245+ tsconfigRaw : TsconfigJson
246246 tsgo : Omit < TsgoOptions , 'enabled' > | false
247247 }
248248>
@@ -282,14 +282,14 @@ export function resolveOptions({
282282 tsgo = false
283283 }
284284
285- let resolvedTsconfig : TsConfigJsonResolved | undefined
285+ let resolvedTsconfig : TsconfigJsonResolved | undefined
286286 if ( tsconfig === true || tsconfig == null ) {
287287 const { config, path } = getTsconfig ( cwd ) || { }
288288 tsconfig = path
289289 resolvedTsconfig = config
290290 } else if ( typeof tsconfig === 'string' ) {
291291 tsconfig = path . resolve ( cwd || process . cwd ( ) , tsconfig )
292- resolvedTsconfig = parseTsconfig ( tsconfig )
292+ resolvedTsconfig = readTsconfig ( tsconfig ) . config
293293 } else {
294294 tsconfig = undefined
295295 }
0 commit comments