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

fix: widen range for optional webpack dependency #955

Merged
merged 2 commits into from
Jun 10, 2021
Merged

fix: widen range for optional webpack dependency #955

merged 2 commits into from
Jun 10, 2021

Conversation

sonallux
Copy link
Contributor

Summary

When installing jest-preset-angular with angular 12.0.3, two webpack versions are installed in node_modules:

  • webpack 5.36.2 from jest-preset-angular
  • webapck 5.38.1 from @angular-devkit/build-angular

This PR widens the range of the optional webpack dependency, so the package manager can deduplicate the webpack version. This will result in faster install times and smaller node_modules folder.

Test plan

All tests are green.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@ahnpnl
Copy link
Collaborator

ahnpnl commented Jun 10, 2021

Angular 9 10 (possibly 11 too) don’t have webpack 5. I think it’s better put something like ^4.0.0 || ^5.30.0 or just >=4.0.0

Angular 9 with webpack 4 https://github.com/angular/angular-cli/blob/6770841e07c1c5c980edbde6232fa02da68e6c7b/packages/ngtools/webpack/package.json#L32

Angular 12 with webpack 5 https://github.com/angular/angular-cli/blob/dc6849c7e966a8ade916aa4371b47db7501cb3d1/packages/ngtools/webpack/package.json#L29

@sonallux
Copy link
Contributor Author

Angular 9 10 (possibly 11 too) don’t have webpack 5. I think it’s better put something like ^4.0.0 || ^5.30.0 or just >=4.0.0

I wasn't aware that Angular 9, 10 and 11 are also still supported. I am going to change the range to ^4.0.0 || ^5.30.0.

Copy link
Collaborator

@ahnpnl ahnpnl left a comment

Choose a reason for hiding this comment

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

Thanks!!

@ahnpnl ahnpnl merged commit b3e8047 into thymikee:master Jun 10, 2021
@sonallux sonallux deleted the fix-webpack-optional-dependency branch June 10, 2021 10:32
@sonallux
Copy link
Contributor Author

@ahnpnl Can you perform a new release, so everyone can benefit from this small improvement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants