Skip to content

Commit dc62232

Browse files
committed
fix(register): always inline swc helpers
1 parent d5cd35c commit dc62232

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/jest/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { xxh64 } from '@node-rs/xxhash'
2+
import type { Output } from '@swc/core'
23
import { Options, transformJest } from '@swc-node/core'
34
import { readDefaultTsConfig, tsCompilerOptionsToSwcConfig } from '@swc-node/register/read-default-tsconfig'
4-
import type { Output } from '@swc/core'
55

66
interface JestConfig26 {
77
transform: [match: string, transformerPath: string, options: Options][]

packages/register/read-default-tsconfig.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,10 @@ export function tsCompilerOptionsToSwcConfig(options: ts.CompilerOptions, filena
132132
((aliasPaths as string[]) ?? []).map((path) => resolve(options.baseUrl ?? './', path)),
133133
]),
134134
) as Options['paths'],
135+
swc: {
136+
jsc: {
137+
externalHelpers: false,
138+
},
139+
},
135140
}
136141
}

0 commit comments

Comments
 (0)