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

Can't provide your own Promise polyfill #4

Closed
0xR opened this issue Oct 29, 2015 · 2 comments
Closed

Can't provide your own Promise polyfill #4

0xR opened this issue Oct 29, 2015 · 2 comments

Comments

@0xR
Copy link

0xR commented Oct 29, 2015

This depends on es6-promise. If you already have loaded a promise polyfill or the browser already supports them es6-promise will still be loaded.

@terinjokes
Copy link
Owner

Ok, will fix.

@terinjokes
Copy link
Owner

I plan on changing this to use anypromise, which lets people override the Promise implementation if they want, and use the native (or polyfilled) Promise otherwise.

terinjokes added a commit that referenced this issue Apr 16, 2017
Replace the Promise shim with `any-promise` to give the caller more
control over which Promise implementation is used.

Fixes #4, fixes #6.

BREAKING CHANGE: No longer ships with the hardcoded `es6-promise`
dependency. If you don't register a preferred Promise implementation,
`any-promise` will attempt to use `global.Promise` or otherwise throws.

Please read the `any-promise` documentation to determine how to register
your preferred Promise implementation.

Alternatively, you may use your bundler's alias option to replace the
`any-promise` module with your preferred implementation.

Webpack:

```javascript
{
  resolve: {
    alias: {
      'any-promise': 'es6-promise'
    }
  }
}
```

Browserify:

With the `aliasify` transform.

```javascript
{
  aliases: {
    'any-promise': 'es6-promise'
  }
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants