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

Only one instance of babel-polyfill is allowed #303

Closed
StabbarN opened this issue May 9, 2017 · 1 comment
Closed

Only one instance of babel-polyfill is allowed #303

StabbarN opened this issue May 9, 2017 · 1 comment

Comments

@StabbarN
Copy link

StabbarN commented May 9, 2017

When migrating from latest 2.x to 3.0-rc6 we get the following error
Error: only one instance of babel-polyfill is allowed when loading our app, which makes sense because it's already been included. We have other libraries that depend on babel-polyfill.

Is it a good idea to include babel-polyfill in indexeddbshim? What to do if it's already added?

I've successfully built indexeddbshim with babel-polyfill excluded from this shim by:

  1. Removed babel-polyfill from indexeddbshim's package.json
  2. Removed
if (global._babelPolyfill) {
  // throw new Error("only one instance of babel-polyfill is allowed");
}

from dist/indexeddbshim.js

We use a makefile to transpile and build Javascript.

Thanks for an awesome shim! We use it on a lot of iOS devices but see a few random failures. We are eager to try out 3.x.

@brettz9
Copy link
Collaborator

brettz9 commented May 10, 2017

This is now addressed in RC 7. We had checks earlier to prevent this, but recently removed when removing babel-polyfill for Node. I think it makes more sense to separate it out (no less because it is recommended to be done this way). A little less convenient for users, but ah well--browsers will hopefully support the features quickly anyways.

Btw, if you are migrating old apps, be sure to check out the CHANGES file, particularly the breaking changes. The biggest issue is probably that old database content will no longer work and there is unfortunately no migration path that we provide.

Closing for now as should be fixed but feel free to comment further.

@brettz9 brettz9 closed this as completed May 10, 2017
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