-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add UMD wrapper for distribution #21
Comments
I have some observations when trying to consume this library in a browser environment:
I don't mind contributing, but the approach I would take may not fit in with your preferred toolsets:
If anyone else is interested the following WebPack configuration + es6 index appears to work: lib-es6/index.js
webpack.config.js
|
Thanks for the notes. I think the Webpack issues may be idiosyncratic depending on your Webpack setup, as we have a number of applications using Webpack and bundling
This shouldn't be the case - we build from scratch in Travis. You do need
I haven't seen issues with this, but it may be something we can turn off in Emscripten. Can you file a separate issue for this?
Can you describe this more, and possibly file a separate issue? |
The last issue isn't really an issue -- the When I have some time to get an h3-wasm written, that concern will go away as the payload will be binary and more compact than a minifier could push it, anyways. |
Not sure that's true, as I think most consumers will still use the JS version as the default, since the WebAssembly version necessarily incurs more complexity (e.g. async loading of the binary) until better browser support shows up - plus Node or isomorphic usage will still require JS. |
Node users should be using h3-node instead for the performance benefits, and modern browsers should (when ready) use I think this package compiling to |
I think there are going to be cases where either requirements for isomorphic code and/or the comparative simplicity of the native JS version are going to significantly outweigh the perf improvements in using |
To address @GordonSmith's suggestions:
Agreed. I've started on this, but the Emscripten piece adds complexity to the build.
Not sure is this is needed - buble + rollup should be fine, and is lighter-weight and simpler than Babel. We're unlikely to move to TS any time soon, though I'd like to provide TS typedefs for the lib.
I've started on this, but got blocked by Emscripten already wrapping the core lib in UMD. Planning to pursue in the next month or so.
We can look into this. Agree with @dfellis that further minification is probably a bad idea, so the |
Thanks for the informative posts:
I don't believe I need to open any new issues at this time? |
So |
This might make the library a bit more accessible, and easier to use in Observable etc.
The text was updated successfully, but these errors were encountered: