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

Angular: Fix angular 13.1 JIT error and HMR reload #17131

Merged
merged 3 commits into from Jan 6, 2022

Conversation

ThibaudAV
Copy link
Contributor

@ThibaudAV ThibaudAV commented Jan 5, 2022

Issue: #17039

What I did

  • Disable unnesasary webpack stuff if we use angular-cli >= 12
  • Add deprecation warning when project use angular.json with legacy way
  • Add watch option for angular 13.x

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

Angular test by @ThibaudAV locally on project :

  • Angular 12.x (with csf3 and IRL project :p )
  • Angular 13.x
  • Angular 12.x with fresh install

other ?

If your answer is yes to any of these, please make sure to include it in your PR.

@nx-cloud
Copy link

nx-cloud bot commented Jan 5, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit abdcedd. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@ThibaudAV ThibaudAV changed the title Angular/fix angular 13.1 Angular: fix angular 13.1 JIT error and hmr reload Jan 5, 2022
@ThibaudAV ThibaudAV added bug maintenance User-facing maintenance tasks angular and removed maintenance User-facing maintenance tasks labels Jan 5, 2022
@@ -142,8 +147,12 @@ async function getLegacyDefaultBuildOptions(options: PresetOptions) {
return {};
}

// TODO ~ legacy way to get default options
// TODO ~ Add deprecation warning and ex for builder use ? `);
logger.warn(dedent` Your Storybook startup uses a solution that will not be supported in version 7.0.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can improve my English 😅

@ThibaudAV ThibaudAV marked this pull request as ready for review January 5, 2022 15:05
@ThibaudAV ThibaudAV requested a review from a team January 5, 2022 15:34
@shilman shilman changed the title Angular: fix angular 13.1 JIT error and hmr reload Angular: Fix angular 13.1 JIT error and hmr reload Jan 5, 2022
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Jan 5, 2022
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ThibaudAV !!!! 🙏 🙏 🙏

It looks like this is breaking on the Angular12 e2e tests. Can you please take a look?

@ThibaudAV
Copy link
Contributor Author

ThibaudAV commented Jan 6, 2022

thanks will do more test with fresh install in Angular 12.x. (not only a CSF3 and IRL project)

@ThibaudAV
Copy link
Contributor Author

fixed no ?

There are now 2 distincts modes old and new. It was necessary to exclude this configuration with the same "reasoning"

angular >=13 -> new way
angular 12.2.x with builder -> new way
other (<=12) -> old way

there is this distinction for the builder and angular 12 because it allowed to validate the new way before angular 13. and I think it's good to keep it

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ThibaudAV !!! 🙏 💯 🎖️

@shilman shilman changed the title Angular: Fix angular 13.1 JIT error and hmr reload Angular: Fix angular 13.1 JIT error and HMR reload Jan 6, 2022
@shilman shilman merged commit f13dd92 into next Jan 6, 2022
@shilman shilman deleted the angular/fix-angular-13.1 branch January 6, 2022 14:29
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jan 10, 2022
shilman added a commit that referenced this pull request Jan 10, 2022
Angular: Fix angular 13.1 JIT error and HMR reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
angular bug patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants