This repository has been archived by the owner on Aug 4, 2021. It is now read-only.
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.
UMD imports doesn't resolve correctly with AMD output #114
Labels
Hello guys,
Last week experimented with rollup, rollup-commonjs, rollup-node-define package to build a all-in-one library package. I have 1 external dependency that I was trying to bundle up with my source code. The dependency was in UMD format. It did not resolve correctly, I tried many times to rebundle it by playing around with the configuration and turning off commonjs and only using node-define, etc. But none of that worked. Then, I switched to webpack and everything worked fine. The external library in question is 'jssha'.
Here is structure of the 'jssha' library that gets bundled up using the 3 tools above:
And again, my whole library is wrapped in AMD define function. So when my environment runs this bundled code, it basically returns the 'define(function(){return C})' inside of the wrapper which I believe causes it to break. Can you please look into this? I love the idea of rollup but this problem was the only obstacle that had me reeling towards webpack. I wish I can use rollup, it's so much simpler and compiling to ES6 a good performance factor for us too. Thanks, let me know if I can clear anything up.
The text was updated successfully, but these errors were encountered: