Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration for verbatimModuleSyntax: true #10078

Closed
colinaaa opened this issue Feb 21, 2025 · 1 comment
Closed

Add configuration for verbatimModuleSyntax: true #10078

colinaaa opened this issue Feb 21, 2025 · 1 comment
Milestone

Comments

@colinaaa
Copy link
Contributor

Describe the feature

In the SWC documentation, it said that it is recommended to use verbatimModuleSyntax: true.

But the actual default value of SWC is false and there is no place to change that

/// https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax
#[serde(default)]
pub verbatim_module_syntax: BoolConfig<false>,

This would make SWC produce different output with TypeScript:

It would be great if jsc.transform.verbatimModuleSyntax could be added.

Babel plugin or link to the feature description

No response

Additional context

No response

@magic-akari
Copy link
Member

Good news: jsc.transform.verbatimModuleSyntax is definitely usable.
The confusion probably came from a JSON schema definition hiccup we will fix soon.
Check this link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants