-
-
Notifications
You must be signed in to change notification settings - Fork 752
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
babel-polyfill replaces existing Promise implementation #510
Comments
I would assume that require('feathers');
const Bluebird = global.Promise = require('bluebird'); works right? Could this be a bug with I agree that core shouldn't include |
@daffl I' have It depends on what the polyfill is used for in Feathers. For the features that Node 4 doesn't support it would probably be better to have fine-grained core-js polyfills, and for ES5 features the users are on their own. This lowers the footprint at least. Not sure if this is a fault of
|
This has been fixed via #662 in v2.2.0 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue with a link to this issue for related bugs. |
This is caused by the fact that
core-js/shim
(which is used bybabel-polyfill
) aggressively applies polyfills to global objects if it thinks that they aren't good enough, almost every non-nativePromise
falls into this category.Steps to reproduce
Expected behavior
require('feathers')
keeps globals intact. If there is anotherPromise
implementation (i.e Bluebird which was installed globally asglobal.Promise
), it isn't replaced with a polyfill.If
Promise
or other JS feature should exist in supported Node versions but is missing in user Node version, the user is responsible for providing polyfills for them (falls into 'unsupported' category).Actual behavior
require('feathers')
loadsbabel-polyfill
which replaces existing non-nativePromise
implementation with a polyfill.System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working): [email protected]
NodeJS version: 7.2.0 x64
Operating System: Windows 7
The text was updated successfully, but these errors were encountered: