diff --git a/packages/core/index.ts b/packages/core/index.ts index 97a6214f2..e656f7f2d 100644 --- a/packages/core/index.ts +++ b/packages/core/index.ts @@ -35,6 +35,7 @@ function transformOption(path: string, options?: Options, jest = false): SwcOpti filename: path, jsc: { target: opts.target ?? DEFAULT_ES_TARGET, + externalHelpers: jest ? true : false, parser: { syntax: 'typescript' as const, tsx: typeof opts.jsx !== 'undefined' ? opts.jsx : path.endsWith('.tsx'),