Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

fix: define process as undefined #619

Merged
merged 1 commit into from
Jul 25, 2018
Merged

fix: define process as undefined #619

merged 1 commit into from
Jul 25, 2018

Conversation

sis0k0
Copy link
Contributor

@sis0k0 sis0k0 commented Jul 25, 2018

This will prevent webpack from adding a polyfill for process (process/browser.js) whenever it sees this code: typeof process. What will change:

  • process will be undefined instead of Object.
  • typeof process === 'undefined' will return true
  • Angular Animations won't assume the app is running in node context
    (check) and won't trigger logic which breaks {N} animations.

Important
This may break plugins that check if the process object is defined.

fixes NativeScript/nativescript-angular#1433

This will prevent webpack from adding a polyfill for `process` (`process/browser.js`) whenever someone does `typeof process`. What will change:

- process will be undefined instead of Object.
- `typeof process === 'undefined'` will return true
- Angular Animations won't assume the app is running in node context
([check](https://github.com/angular/angular/blob/d4ac9698ba7dd829600ca4c8129fcbeae9cb4bed/packages/animations/browser/src/render/shared.ts#L17)) and won't trigger logic which breaks {N} animations.

** Important **
This may break plugin which check if the `process` object is defined.

fixes NativeScript/nativescript-angular#1433
@sis0k0 sis0k0 requested a review from vakrilov July 25, 2018 13:00
@sis0k0 sis0k0 merged commit 845f426 into master Jul 25, 2018
@sis0k0 sis0k0 deleted the sis0k0/process branch July 25, 2018 14:01
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 this pull request may close these issues.

Angular Animations does not work with webpack
2 participants