Skip to content

Experimental Webpack 5 Support - #18820

Merged
filipesilva merged 4 commits into
angular:masterfrom
clydin:webpack-5-experimental
Sep 21, 2020
Merged

filipesilva merged 4 commits into
angular:masterfrom
clydin:webpack-5-experimental

Conversation

@clydin

@clydin clydin commented Sep 18, 2020 •

Copy link
Copy Markdown
Member

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
@clydin
clydin requested a review from alan-agius4 September 18, 2020 17:45

@alan-agius4 alan-agius4 left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown

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

@tatsujb

tatsujb commented Oct 2, 2020

Copy link
Copy Markdown

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
Copy Markdown

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.

6 participants