-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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: conflict between core-js and bfs-process #6136
Conversation
@@ -40,6 +40,11 @@ export default function ( | |||
delete allGlobals.global; | |||
} | |||
|
|||
// This is a hack to make core-js work... | |||
if (window.process.versions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a pretty big hack, see the PR description for better (bigger) solutions/refactors
Build for latest commit d93eae8 is at https://pr6136.build.csb.dev/s/new. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d93eae8:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I would perhaps also put in the comment a link to this PR to make sure that we know exactly why it's happening. Very tricky, some things need window.process
, other things break with it...
What kind of change does this PR introduce?
This PR fixes an issue with core-js and bfs-process conflicting.
We definitely need to have a look at how to prevent all the global scope poluting we (and mainly browser-fs) does though, as these bugs can be prevented pretty easily that way.
Also probably a good idea to revisit the eval code at some point as it also has some weird behaviour with core-js, specifically this line: https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/global.js#L2
Also this one for detecting v8 engine using the nodeJS path: https://github.com/zloirock/core-js/blob/master/packages/core-js/internals/engine-v8-version.js
Closes #5943