-
Notifications
You must be signed in to change notification settings - Fork 312
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
Support ESM #710
Labels
Comments
Merged
2 tasks
ahnpnl
added a commit
that referenced
this issue
Jan 7, 2021
…717) Copy source code of TypeScript `transpileModule` so that we can get `Program` which is created in that function which then allows us to use `replace-resources` transformer from Angular. This also provides fully compatibility to ESM for `isolatedModules: true`, related to #710 BREAKING CHANGE - `inline-files` and `strip-styles` are removed from `jest-preset-angular` and now `jest-preset-angular` always uses Angular `replace-resources` instead for both `isolatedModules: false` and `isolatedModules: true`. - The transformers in your jest config ``` 'jest-preset-angular/build/InlineFilesTransformer' 'jest-preset-angular/build/StripStylesTransformer' ``` or ``` 'jest-preset-angular/build/transformers/inline-files' 'jest-preset-angular/build/transformers/strip-styles' ``` must be removed
This was referenced Jan 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🚀 Feature Proposal
Support compilation to ESM for both
isolatedModules: false
andisolatedModules: true
. Potential work:inline-files
andstrip-styles
transformers to transform toESM
compatible codes, like the wayreplace-resources
does. This is important forisolatedModules: true
because it doesn't use TypeScriptProgram
therefore it can't reuseinline-resources
transformer.isolatedModules: false
compilation path to acceptmodule
ESM values, includingES2015
/ES2020
andESNext
for compiler options. CurrentlyisolatedModules: true
already did it.replace-resources
can be used forisolatedModules: true
.Motivation
Allow users to switch to ESM when they want.
Example
Test and check whether ESM output is produced
The text was updated successfully, but these errors were encountered: