diff --git a/index.ts b/index.ts index 1fc4c8e..c03c17b 100644 --- a/index.ts +++ b/index.ts @@ -122,6 +122,10 @@ function buildSwcTransformOpts(swcOptions: (Options & { experimental?: unknown } set(computedSwcOptions, 'sourceMaps', 'inline') } + if (computedSwcOptions.jsc?.baseUrl) { + set(computedSwcOptions, 'jsc.baseUrl', path.resolve(computedSwcOptions.jsc.baseUrl)) + } + return computedSwcOptions }