Skip to content

Try to understand how Babel work in TSConfig documentation for option allowSyntheticDefaultImports #16335

Answered by nicolo-ribaudo
nyngwang asked this question in Q&A
Discussion options

You must be logged in to vote

It's @babel/plugin-transform-modules-commonjs. It's not just Babel btw, every tool does that when compiling ESM to CJS :) Also Node.js does the same.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@liuxingbaoyu
Comment options

@nyngwang
Comment options

@liuxingbaoyu
Comment options

@nyngwang
Comment options

@liuxingbaoyu
Comment options

Answer selected by nyngwang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants