-
Notifications
You must be signed in to change notification settings - Fork 57
src/index.js as main in package.json #46
Comments
Actually, webpack does not like |
Apparently this is linked to ipfs/aegir#175. Not sure if you want to keep this issue opened... |
Strange that your report is that WebPack doesn't like //cc @victorbjelkholm to help here. |
Hey, Here is the explanation that comes with the minification error: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify |
By the way I have the same issue with https://github.com/libp2p/js-libp2p-crypto that's built with My workaround is to use |
dist/index.js is the bundle, that means that it has the code + all of its dependencies shimmed. We want to enable users to create their own bundle so that they can trim unused code and only shim dependencies once. aegir also uses WebPack for the bundling and minifies it with uglify-es (https://github.com/ipfs/aegir/blob/master/package.json#L81) which supports ES6. You can check our WebPack config at https://github.com/ipfs/aegir/tree/master/src/config |
I guess it's pretty hard to provide a library that can be used properly from Node and from the browser. I'm using |
old issue gonna close this, feel free to reopen |
Hey,
Thank you for this package!
I was just wondering if there is a reason why
src/index.js
is configured as the main file instead ofdist/index.js
?It messes up with webpack that tries to minify
src/index.js
even though it's not ES5.Thanks!
The text was updated successfully, but these errors were encountered: