Skip to content

feat(@angular-devkit/build-angular): auto configure hot module replacement (HMR) #18788

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

Merged
merged 1 commit into from
Sep 25, 2020
Merged

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Sep 15, 2020

With this change we configure HMR internally and therefore users which want to use basic HMR functionality will not longer be required to change their application code.

This is important because previously a lot of users missed out on HMR or reported a broken behaviour. This also gives novice/new users a better chance to appreciate HMR and Angular because of the zero effort required to use HMR.

Closes #17324

@alan-agius4 alan-agius4 changed the title wip! auto configure HMR feat(@angular-devkit/build-angular): auto configure hot module replacement (HMR) Sep 16, 2020
@alan-agius4 alan-agius4 added target: major This PR is targeted for the next major release state: WIP and removed state: WIP labels Sep 16, 2020
@alan-agius4 alan-agius4 requested a review from clydin September 17, 2020 10:34
@alan-agius4 alan-agius4 marked this pull request as ready for review September 17, 2020 10:34
@alan-agius4 alan-agius4 added the needs: discussion On the agenda for team meeting to determine next steps label Sep 24, 2020
@alan-agius4 alan-agius4 requested a review from clydin September 24, 2020 17:38
@kyliau kyliau requested review from kyliau and dgp1130 September 24, 2020 18:06
@alan-agius4 alan-agius4 removed the needs: discussion On the agenda for team meeting to determine next steps label Sep 24, 2020

function restoreFormValues(oldInputs, oldOptions) {
// Restore input
const newInputs = document.querySelectorAll('input');
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about shadow roots? I don't think this would pick up input elements hidden under a shadow root, though I don't know how commonly those are used in Angular applications.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think it's that common, I don't want to add complexity and use-cases to support just for the sake of it. I think we can evaluate shadow root based on the community feedback.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm fine to defer it, though we may want to document that limitation somewhere.

…ement (HMR)

With this change we configure HMR internally and therefore users which want to use basic HMR functionality will not longer be required to change their application code.

This is important because previously a lot of users missed out on HMR or reported a broken behaviour. This also gives novice users a better chance to appreciate HMR and Angular because of the zero effort required to use HMR.

Closes #17324
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Sep 25, 2020
@alan-agius4 alan-agius4 merged commit dbdd3fc into angular:master Sep 25, 2020
@alan-agius4 alan-agius4 deleted the hmr-auto branch September 25, 2020 18:21
@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 Oct 26, 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.

HMR configuration - Live Reload still enabled
5 participants