Open yf-yang opened 3 weeks ago
Sorry, experimentalDecorator is stage2 decorator. Perhaps it should be explicitly configured.
As per https://github.com/web-infra-dev/modern.js/pull/5849. We're going to bump esbuild https://github.com/evanw/esbuild/blob/main/CHANGELOG.md#0210.
What problem does this feature solve?
I'd like to build a module which uses stage3 decorator. In modern.js app + rspack, I can easily configure swc to do so:
However, it seems modern.js module is using esbuild and there is no way to explicitly configure using swc or enable swc for this decorator transform.
Example file you can test with:
What does the proposed API look like?
Maybe use SWC when "experimentalDecorator" of tsconfig is true?
Related: https://modernjs.dev/module-tools/en/guide/advance/in-depth-about-build.html#use-swc