MyCryptoHQ/shepherd

umd build does not work in browser

wangzuo opened this issue · 5 comments

The current dist bundle does not include any external modules. Any plan to support this module as a standalone library? I really like the provider design of this library and can help with this.

Thank you.

Hi @wangzuo, any reason for closing this issue? I'd be happy to help provide / collaborate solutions for this. We never had a need to package the external modules with the bundle since we use Webpack on our browser build to provide the needed modules.

Here is my attempt to add the browser build: master...wangzuo:webpack-build. There is still some work to reduce the bundle size and add test case.

Nice! I'm hoping that this does not break builds that expect it to not have any external dependencies bundled though. But as far as I can see, it shouldn't as our Webpack build for the site should be pulling the .es6 version. Also, is webpack needed for this? Rollup might work still.

I think webpack is more straightforward here with built-in node libs support. Also it mighty also be helpful to export a minimal build of shepherd with only the network layer (no redux ...)..

It would be useful to have a comparison of bundle size of webpack vs rollup here.