Babel should not run in published code
vasco-santos opened this issue · 7 comments
I was integrating libp2p-noise
in js-ipfs
and I got some issues with the integration.
It seems that libp2p-noise
code is being transpiled and it should not.
Context: ipfs/js-ipfs#3074
ipfs/js-ipfs#3074 (comment)
I will open PR to fix babel not to use global regeneratorRuntime and try it out in js-ipfs
I confirm. It breaks electron builds with the following error
Uncaught ReferenceError: regeneratorRuntime is not defined
at handshake-xx.js:59
at handshake-xx.js:58
at Object.ca6b (handshake-xx.js:18)
at c (bootstrap:89)
at Module.56d7 (app.c5eca448.js:1)
at c (bootstrap:89)
at Object.0 (app.c5eca448.js:1)
at c (bootstrap:89)
at a (bootstrap:45)
at bootstrap:267
(this comment to know when the issue is solved, and if it may help others faced with the same electron builds problem)
@vasco-santos Can you try building and linking this: #62
I've tried and all examples in ipfs works.
@mpetrunic did you try this removing the "@babel/plugin-transform-runtime"
from the examples I have changed in the PR?
@mpetrunic did you try this removing the
"@babel/plugin-transform-runtime"
from the examples I have changed in the PR?
Yes, I've reverted back to commit before you added those
I could run it now without issues. Browser caching 😓
Thanks for looking into it
Cool, I will merge and release