From b32cb11cae2d09442065f25df9194976731ed8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Fri, 11 Aug 2023 01:50:36 +0900 Subject: [PATCH] baseUrl --- packages/core/index.ts | 1 + packages/register/read-default-tsconfig.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/core/index.ts b/packages/core/index.ts index 97cc706ef..071675fb6 100644 --- a/packages/core/index.ts +++ b/packages/core/index.ts @@ -22,6 +22,7 @@ export interface Options { keepClassNames?: boolean externalHelpers?: boolean react?: Partial + baseUrl?: string paths?: { [from: string]: [string] } diff --git a/packages/register/read-default-tsconfig.ts b/packages/register/read-default-tsconfig.ts index 3c41e41b1..9f98cf1b8 100644 --- a/packages/register/read-default-tsconfig.ts +++ b/packages/register/read-default-tsconfig.ts @@ -120,6 +120,7 @@ export function tsCompilerOptionsToSwcConfig(options: ts.CompilerOptions, filena useBuiltins: true, } : undefined, + baseUrl: resolve(options.baseUrl ?? './'), paths: Object.fromEntries( Object.entries(options.paths ?? {}).map(([aliasKey, aliasPaths]) => [ aliasKey,