Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

zone.js loaded by twice, by two separate sources #910

Closed
umairda opened this issue Sep 20, 2017 · 4 comments · Fixed by #1093
Closed

zone.js loaded by twice, by two separate sources #910

umairda opened this issue Sep 20, 2017 · 4 comments · Fixed by #1093

Comments

@umairda
Copy link

umairda commented Sep 20, 2017

I built a JS widget using angular 2 that is embedded on other websites. One of the sites that the widget is embedded on has another script that loads zone.js. So when my script loads I get the error:

Error: Zone already loaded. at new g...

Is there a way to configure angular-cli (1.0.0-rc.0)/webpack to not load zone.js if it has previously been loaded?

@umairda umairda closed this as completed Sep 20, 2017
@oztek22
Copy link

oztek22 commented May 22, 2018

Is there any way to determine it or not?

JiaLiPassion added a commit to JiaLiPassion/zone.js that referenced this issue May 22, 2018
JiaLiPassion added a commit to JiaLiPassion/zone.js that referenced this issue May 22, 2018
JiaLiPassion added a commit to JiaLiPassion/zone.js that referenced this issue May 26, 2018
JiaLiPassion added a commit to JiaLiPassion/zone.js that referenced this issue Jun 20, 2018
JiaLiPassion added a commit to JiaLiPassion/zone.js that referenced this issue Jun 20, 2018
JiaLiPassion added a commit to JiaLiPassion/zone.js that referenced this issue Jun 25, 2018
ankit886 added a commit to ankit886/zone.js that referenced this issue Jul 2, 2018
@aaaa0441
Copy link

aaaa0441 commented Sep 5, 2018

I need to subscribe myself to this issue, waiting for a release of the fix.

@umairda
Copy link
Author

umairda commented Sep 5, 2018

I was able to solve this issue by ejecting the webpack config then namespacing my chunks via the jsonpFunction option.

To be honest I don't understand how this resolves the issue of zone.js being loaded twice- but it does.

@mleibman
Copy link
Contributor

Should the same be done for loading patches?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants