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

Experimental Webpack 5 Support #18820

Merged
merged 4 commits into from Sep 21, 2020

Conversation

clydin
Copy link
Member

@clydin clydin commented Sep 18, 2020

This change enables experimental support for Webpack v5 in the Angular CLI. At this point, we don't recommend using Webpack v5 for production usage.

By default, the Angular CLI uses Webpack v4. To enable Webpack v5, use yarn as your package manager and add the following top-level property to package.json:

  "resolutions": {
    "webpack": "^5.0.0-beta.30"
  }

Please note that the support is experimental, and webpack v5 is still in beta. Some Angular CLI features and options are partially supported, and new prereleases of webpack v5 may contain breaking changes. You may temporarily see Webpack deprecation warnings, which we'll fix over time.

… based on version 4/5

This change adds helpers to allow the Webpack configuration to be automatically adjusted based on the Webpack version in use.
These helpers are then used to provide configuration compatibility for Webpack 5 which has several differences to the Webpack 4 configuration.
Behavior is maintained between the two versions so that external option behavior is not altered.
…5 license extraction

The license extraction plugin is currently causing errors when building/serving with Webpack 5.  This change temporarily disables the option when Webpack 5 is used until further investigation can take place and to unblock initial Webpack 5 support.
The Webpack 5 filesystem watch function has a different return object type than Webpack 4. This change adjusts the behavior based on the used Webpack version.
@clydin clydin added the target: major This PR is targeted for the next major release label Sep 18, 2020
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

👍

@clydin clydin added the action: merge The PR is ready for merge by the caretaker label Sep 19, 2020
@xiaoxiangmoe
Copy link

@clydin webpack relase v5.0.0-rc.0 now.

@tatsujb
Copy link

tatsujb commented Oct 2, 2020

Will the 2020-10-10 release of webpack 5 imply a new version of angular-cli so as to fix a year-long chain-dependency deprecation issue?

Angular Cli is actually unbuildable on mac 10.15 (catalina) as it stands today.

This, in my view, should make it into v10.1.5 and that be released on the day ( 2020-10-10 )

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants