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(core): add warning when using zoneless but zone.js is still loaded #55769

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

Users may be using zoneless, but are still loading Zone.js in which case they won't get the full benefits like reduced bundle size. These changes detect such a case and log a warning.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: rc This PR is targeted for the next release-candidate labels May 13, 2024
@ngbot ngbot bot added this to the Backlog milestone May 13, 2024
@crisbeto crisbeto requested a review from atscott May 13, 2024 07:15
@crisbeto crisbeto marked this pull request as ready for review May 13, 2024 07:15
Copy link
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

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

LGTM (with one nit comment) but as @JeanMeche noted the negative error code suggest that there are docs for this error, while docs are not part of this PR. Either add docs or flip the negative sign on the error code.

@crisbeto
Copy link
Member Author

I've switched it to a positive error code.

Copy link
Contributor

@dylhunn dylhunn left a comment

Choose a reason for hiding this comment

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

reviewed-for: fw-core

Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

LGTM (just 1 non-blocking comment) 👍

Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

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

reviewed-for: public-api

@atscott atscott added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels May 15, 2024
Users may be using zoneless, but are still loading Zone.js in which case they won't get the full benefits like reduced bundle size. These changes detect such a case and log a warning.
Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

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

reviewed-for: fw-core, public-api

@dylhunn
Copy link
Contributor

dylhunn commented May 21, 2024

This PR was merged into the repository by commit ae0baa2.

@dylhunn dylhunn closed this in ae0baa2 May 21, 2024
dylhunn pushed a commit that referenced this pull request May 21, 2024
#55769)

Users may be using zoneless, but are still loading Zone.js in which case they won't get the full benefits like reduced bundle size. These changes detect such a case and log a warning.

PR Close #55769
@spock123
Copy link

Just FYI, @angular/fire does not work without Zones, so the only way to use that with zoneless, is to still load zoneJS in polyfills, but use the zoneless change detection. Removal of zoneJS from polyfills will lead to @angular/fire crashing out badly.

So for a while , until they get that fixed (if they do), this will give a warning for a lot of people trying out zoneless with @angular/fire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants