-
-
Notifications
You must be signed in to change notification settings - Fork 626
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
Dexie2 with Webpack2 is incompatible with ES5 #466
Comments
This is mostly a duplicate of #460. The typings issue is fixed using:
in tsconfig.json. Dexie does not depend on any runtime es6 feature but used some when available (such as toStringTag, Symbol and Iterators) |
It looked like Dexie was using |
Next release will have #460 fixed so there will be no const in the dist version. If it's a showstopper we could release it asap. |
No rush, was just testing out the beta :) |
Thanks for testing it out 🥇 Resently released beta 10. If you have a change, please try it and see if it resolves the issue. Closing for now, feel free to reopen! |
I can confirm beta 10 works :) |
I'm having the same issue, the beta 11 does not work for me. Here is my tsconfig:
I get the error: I tried changing Thanks for your help. |
@sebastien-roch put |
@nponiros oh my... thanks, that did the trick! (but I'm surprised Typescript didn't catch that) |
Webpack 2 supports ES6 modules and uses the
module
field in package.json to look for a module-ized version of the source files. It does not do any transpiling of the files that it finds.Dexie 2.0.0-beta.9 provides a full ES6 version in its
module
field, which results in Webpack bundling files that aren't compatible with ES5 browsers. The TypeScript .d.ts also requires full ES6 support enabled due to Iterables andSymbol.toStringTag
.This effectively means we have to choose between Webpack 2 and Dexie 2, or figure out how to blacklist loading Dexie with ES6 modules in our Webpack config.
I'm not sure what the best solution here is... Webpack and Rollup's guidelines are to publish and point to ES5-compatible code using only the ES6 module syntax in the
module
field.The text was updated successfully, but these errors were encountered: