Skip to content

Commit 1d557ec

Browse files
committedFeb 7, 2023
fix(register): always inline swc helpers
1 parent d5cd35c commit 1d557ec

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed
 

‎.github/workflows/CI.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: |
3636
npm install -g corepack
3737
corepack enable
38-
pnpm install
38+
pnpm install -r
3939
4040
- name: Build TypeScript
4141
run: pnpm build

‎packages/jest/index.ts

+1-1
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

+5
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)
Please sign in to comment.