Josh-ES / react-here-maps

React.js HERE Maps component
MIT License
35 stars 25 forks source link

Remove dependency on bluebird and corejs #14

Open haimlit opened 7 years ago

haimlit commented 7 years ago

Is it possible to drop the bluebird and corejs dependencies? They weight quite a lot. react-here-maps is the project using bluebird among my dependencies, and webpack uses another version of core-js than bluebird, so I get this dependency bundled twice. I think it should be the consumer's choice if to use polyfills or not, and webpack usually fills that role sufficiently.

Josh-ES commented 7 years ago

Understood, I'll investigate making the changes. I believe core-js might be able to be moved to a development dependency, but bluebird might require more investigation.

schtauffen commented 7 years ago

core-js in particular has cost our team a few days of issues before we determined the cause. Please either 1) remove dependency on core-js altogether and let people polyfill as necessary 2) import namespaced polyfills that do not affect the global scope:

import * as Map from 'core-js/library/fn/map'

In addition to preventing errors with other libraries, core-js is like 500 modules which everyone shouldn't be forced to bundle.