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

Don't assume global #6

Closed
nvahalik opened this issue Oct 22, 2019 · 3 comments
Closed

Don't assume global #6

nvahalik opened this issue Oct 22, 2019 · 3 comments

Comments

@nvahalik
Copy link

Angular CLI no longer supports global shims as of 6.x. Therefore this module will break projects which use it:

var origSymbol = global.Symbol;

See also: ljharb/es-abstract#59 and angular/angular-cli#9827 (comment)

@ljharb
Copy link
Member

ljharb commented Oct 22, 2019

Angular is the only thing that doesn’t support global - it’s a bug for it not to.

You can probably work around it by adding window.global = window to the front of your app code.

@fourgates
Copy link

I am also having this issues. I added the following code to polyfills.ts:

(window as any).global = window;

@ljharb
Copy link
Member

ljharb commented Dec 10, 2019

Anything transforming node code for the browser should be transforming global to window. Please file a bug on any transformer that does not do this.

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

No branches or pull requests

3 participants