-
-
Notifications
You must be signed in to change notification settings - Fork 541
Closed
Milestone
Description
Search Terms
- swc dynamic imports
- swc 'regenerator-runtime'
Expected Behavior
Dynamic imports should continue to work after switching to the swc transpiler.
Actual Behavior
Throws Error: Cannot find module 'regenerator-runtime
Steps to reproduce the problem
const example = async () => {
const other = await import('./other')
console.log(other)
}
example().then(() => console.log(`done`))
See TypeStrong/ts-node-repros#20 for full example.
Minimal reproduction
Specifications
- ts-node version: v10.2.1
- node version: v16.8.0
- TypeScript version: 4.4.3
- tsconfig.json, if you're using one:
{
"extends": "ts-node/node16/tsconfig.json",
"ts-node": {
"transpileOnly": true,
"transpiler": "ts-node/transpilers/swc-experimental"
},
"include": ["**/*.ts"],
"exclude": ["node_modules"]
}
- Operating system and version: macOS 11.6 Big Sur
- If Windows, are you using WSL or WSL2?: no
Metadata
Metadata
Assignees
Labels
No labels