Skip to content
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

Allow easier use of non-browserified ES6 shim #373

Open
briancavalier opened this issue Sep 26, 2014 · 1 comment
Open

Allow easier use of non-browserified ES6 shim #373

briancavalier opened this issue Sep 26, 2014 · 1 comment

Comments

@briancavalier
Copy link
Member

See #367

Using the pre-browserified ES6 shim is problematic for folks who want to include it in their own browserify build. Apparently, browserify chokes on already-browserified files, unless you do some extra work.

Some options:

  1. Rename when/es6-shim/Promise.browserify-es6 to a nicer, more obvious name
  2. Change the name of when/es6-shim/Promise to something that indicates it has already been browserified and also move when/es6-shim/Promise.browserify-es6 to when/es6-shim/Promise. That'd be a breaking change for some folks

Thoughts? Other options?

@jgornick
Copy link

@briancavalier It would also be nice if the exported object would match that of https://github.com/jakearchibald/es6-promise (i.e. require('es6-promise').Promise). I've had to modify the browserify shim to add a Promise property on the PromiseContructor:

PromiseConstructor.Promise = PromiseConstructor;

I agree with the ugly-ish name for browserify users, but because so many libs and users already use es6-promise, it would be nice if it could really be a drop-in replacement for es6-promise.

As a side note, I also alias es6-promise to when/es6-shim/Promise.browserify-es6 with aliasify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants