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

feat(compiler): use replace-resources transformer from Angular #708

Merged
merged 1 commit into from Jan 6, 2021
Merged

feat(compiler): use replace-resources transformer from Angular #708

merged 1 commit into from Jan 6, 2021

Conversation

ahnpnl
Copy link
Collaborator

@ahnpnl ahnpnl commented Jan 5, 2021

Summary

  • Use replace-resources transformer for isolatedModules: false.
  • inline-files and strip-styles are only used for isolatedModules: true.

With this change, we are 95% identical to the way @angular/cli does with Karma + Jasmine.

Test plan

  • Added unit tests, e2e tests

  • Green CI

Does this PR introduce a breaking change?

  • Yes
  • No
  • isolatedModules: true will use inline-files and strip-styles transformers as default transformers.
  • isolatedModules: false will use replace-resources transformer from @ngtools/webpack (besides the existing downlevel-ctor transformer). This will make jest-preset-angular become closer to what Angular CLI does with Karma + Jasmine.

Other information

N.A.

BREAKING CHANGE
- `isolatedModules: true` will use `inline-files` and `strip-styles` transformers as default transformers.
- `isolatedModules: false` will use `replace-resources` transformer from `@ngtools/webpack` (besides the existing `downlevel-ctor` transformer). This will make `jest-preset-angular` become closer to what Angular CLI does with Karma + Jasmine.
@ahnpnl ahnpnl added the 💣 Breaking Changes Includes a breaking change and should probably wait until we're preparing for the release of a major label Jan 6, 2021
@ahnpnl ahnpnl added this to the 9.0.0 milestone Jan 6, 2021
@ahnpnl ahnpnl marked this pull request as ready for review January 6, 2021 10:44
@ahnpnl ahnpnl merged commit 1b20c19 into thymikee:master Jan 6, 2021
@ahnpnl ahnpnl deleted the replace-resources branch January 6, 2021 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💣 Breaking Changes Includes a breaking change and should probably wait until we're preparing for the release of a major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant