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

Support Angular 15.0.4 #20287

Merged
merged 1 commit into from Dec 15, 2022

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Dec 15, 2022

Issue: N/A

What I did

Angular changed the manipulation behavior in angular/angular-cli@ccc8e03. The webpack plugin adjusts the webpack entry while preparing the webpack compiler environment . The Storybook plugin overwrites webpack.entry earlier, which caused the issue. Now the timing is adjusted and it will overwrite the webpack.entry output of Angular's Styles Webpack Plugin.

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?

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

const webpackOptions = compiler.options;
const entry =
typeof webpackOptions.entry === 'function' ? webpackOptions.entry() : webpackOptions.entry;
compiler.hooks.environment.tap(PLUGIN_NAME, () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This wrapper is the only addition. The rest of the changes are formatting related.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The change is also backward compatible. Tested it with Angular 15.0.3. Angular 15.0.4 introduced the issue.

@ndelangen ndelangen merged commit 970fc0d into next Dec 15, 2022
@ndelangen ndelangen deleted the valentin/fix-angular-15.0.4-webpack-require-issue branch December 15, 2022 12:48
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Dec 16, 2022
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Dec 20, 2022
shilman pushed a commit that referenced this pull request Dec 20, 2022
…4-webpack-require-issue

Support Angular 15.0.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants