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

Added module to package.json for esm suport #977

Merged
merged 1 commit into from Jul 20, 2020
Merged

Added module to package.json for esm suport #977

merged 1 commit into from Jul 20, 2020

Conversation

quentincaffeino
Copy link
Contributor

Closes: #940

@tofumatt tofumatt merged commit 101f12f into localForage:master Jul 20, 2020
@tofumatt
Copy link
Member

Thanks so much! Sorry I didn't get to this yesterday, but I'm shipping a new version now! 😄

@klarstrup
Copy link

This is probably going to break IE11 etc. that don't support all the newness used in src/localforage.js

@quentincaffeino
Copy link
Contributor Author

quentincaffeino commented Jul 21, 2020

@klarstrup How is this able to break anything? Just use precompiled option as you've used before. This is just an option for newer modular bundles that support esm.
Correct me if I'm wrong.

@klarstrup
Copy link

Webpack(and probably rollup) always uses module if provided, and most consumers are not set up to transpile code from node_modules so it gets included in it's raw modern form.

@quentincaffeino
Copy link
Contributor Author

True. Can't say anything about webpack, but from what I've found rollup resolves by default to module, and uses main as a fallback (Docs, Code).

@quentincaffeino quentincaffeino deleted the feature/added-module-for-esm branch July 21, 2020 12:46
@tofumatt
Copy link
Member

Yup, this seems to have broke people's builds. I'm reverting it now, sorry.

@rozek
Copy link

rozek commented Jan 4, 2024

since localForage does not seem to become available as an ECMAScript module in the near future, I just copied the source code and bundled it myself into an ESM - now I can import with ease, even directly from within a browser (i.e., without requiring a build environment)

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

Successfully merging this pull request may close these issues.

Release in ESM format
4 participants