-
-
Notifications
You must be signed in to change notification settings - Fork 797
Description
This is caused by the fact that core-js/shim (which is used by babel-polyfill) aggressively applies polyfills to global objects if it thinks that they aren't good enough, almost every non-native Promise falls into this category.
Steps to reproduce
const NativePromise = global.Promise;
const Bluebird = global.Promise = require('bluebird');
require('feathers');
console.log(Promise !== NativePromise, Promise !== Bluebird);Expected behavior
require('feathers') keeps globals intact. If there is another Promise implementation (i.e Bluebird which was installed globally as global.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') loads babel-polyfill which replaces existing non-native Promise implementation with a polyfill.
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working): feathers@2.0.3
NodeJS version: 7.2.0 x64
Operating System: Windows 7