-
Notifications
You must be signed in to change notification settings - Fork 36
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
Create ES module build #74
Comments
Note: anyone currently facing this problem can get around it by importing import Simpla from 'simpla/simpla.js'
window.Simpla = Simpla; this bypasses the default |
Simpla v3 no longer points to a borked ES build as the |
As per mentioned in #86, I think we should have ES and UMD builds for each part of Simpla, so that will be:
For UMD builds that'll mean following a naming convention to add to the global namespace e.g. |
Only problem with |
Currently the
module
field onpackage.json
points tosrc/simpla.js
but really it should point to a separate build, that's been transpiled, but not bundled. This means that whatever module bundling system consumers are using will still be used, but it won't need to be transpiled. As it currently stands, users can come up against this bug but more generally it'll require them to transpile our source, not just bundle it.An interim measure would be to change where
module
points to - just the transpiled, bundledsimpla.js
in root. The main reason behind giving users an ES module target is so they can tree shake, but as we only have one defaultexport
, Simpla, this is pretty redundant.The text was updated successfully, but these errors were encountered: