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
Configuring zone.js in src/polyfills.ts
won't work, comments are misleading
#12886
Labels
area: schematics/angular
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Milestone
Comments
liujingbreak
changed the title
Configure zone.js in
Configuring zone.js in Nov 7, 2018
src/polyfills.ts
won't work, comments are misleadingsrc/polyfills.ts
won't work, comments are misleading
I was just about to raise the same issue and can confirm the approach mentioned above works! Nice one @liujingbreak |
alan-agius4
added
type: bug/fix
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
area: schematics/angular
labels
Nov 7, 2018
@liujingbreak, thanks, I will check it! |
JiaLiPassion
added a commit
to JiaLiPassion/angular-cli
that referenced
this issue
Dec 4, 2018
…s in other files
JiaLiPassion
added a commit
to JiaLiPassion/angular-cli
that referenced
this issue
Dec 4, 2018
JiaLiPassion
added a commit
to JiaLiPassion/angular-cli
that referenced
this issue
Dec 8, 2018
JiaLiPassion
added a commit
to JiaLiPassion/angular-cli
that referenced
this issue
Dec 8, 2018
JiaLiPassion
added a commit
to JiaLiPassion/angular-cli
that referenced
this issue
Dec 8, 2018
kyliau
pushed a commit
that referenced
this issue
Dec 11, 2018
kyliau
pushed a commit
to kyliau/angular-cli
that referenced
this issue
Dec 11, 2018
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: schematics/angular
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
Node v8.11.1
NPM 6.3.0
Angular CLI: 7.0.4
Repro steps
Project skeleton file
src/polyfills.ts
contains incorrect comments about how to configure zone.js.polyfills.ts contains following comments, but if developer open any of comments like
(window as any).__Zone_disable_requestAnimationFrame = true;
, it won't work, since after Webpack compilation, it actually movesimport "zone.js/dist/zone";
to the top of this file together with otherimport
statements.Therefore Browser executes
import "zone.js/dist/zone";
earlier than any of lines like(window as any).__Zone_disable_requestAnimationFrame = true;
, zone.js will not have chance to read those configuration variables at all.The log given by the failure
N/A
Desired functionality
Developers should be notified that they need to create a separate file maybe call
zone-setting.ts
and put actual(window as any).__Zone_disable_requestAnimationFrame = true;
in that file. Thenimport "./zone-setting.ts";
beforeimport 'zone.js/dist/zone';
to make it work.Mention any other details that might be useful
N/A
The text was updated successfully, but these errors were encountered: