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

Remove custom webpack builder and config temporary while upgarding Angular version via ng update #21666

Closed
1 of 15 tasks
vugar005 opened this issue Aug 27, 2021 · 2 comments
Closed
1 of 15 tasks

Comments

@vugar005
Copy link

vugar005 commented Aug 27, 2021

🚀 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Description

I noticed many Angular projects had issues after upgrading app to v12. Such as : #42799, #21654, #20792
The thing I noticed is they are all (at least so far I seen) using custom webpack builders which I think this causes issues or conflicts during ng update migration.

Update: Just noticed from other user too while trying to help via this solution
image

Describe the solution you'd like

Possible solution: remove custom builder (from angular.json) and webpack config temporary while upgrading via ng update then after succesfull migration reset @angular-devkit/.. with custom builder.
Since while upgrade the application does not need compilation it should not cause errors.
Another possible solution: ng update should complain that we are using custom builder. Remove it first then perform ng update.

Describe alternatives you've considered

Alternative solution is to remove manually . See this reply but many folks do not know about that. They should come across to this reply by luck to fix that. We can either add this to documentation or remove custom builder temporary as possible solution mentioned above or ng update should complain that we use custom builder.

@vugar005 vugar005 changed the title [FE] Remove custom webpack builder and config temporary while upgarding Angular version via ng update Remove custom webpack builder and config temporary while upgarding Angular version via ng update Aug 27, 2021
@alan-agius4
Copy link
Collaborator

When a custom builders we cannot know how the options interact with the builder and what’s its default value and therefore we cannot run certain migrations that augment the angular configuration. In case we don’t run these migrations we issue a warning that a manual review of the configuration is needed, see https://github.com/angular/angular-cli/blob/8ce8e4edc5ca2984d6a36fe4c7d308fa7f089102/packages/schematics/angular/migrations/update-12/update-angular-config.ts#L40:L43

Overall, the true fix for this, is for custom builders to include their own migrations when needed.

I suggest that you raise an issue with the author of the custom builder that you are using to provide automated migrations if they don’t already.

@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 Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants