| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/57354 |
Sorry, something went wrong.
There was a problem hiding this comment.
If we want to make sure it never happens again, we can use acorn-walk to visit the AST and then throw on require() calls:
babel/packages/babel-standalone/test/built-into-es5.js
Lines 6 to 18 in 3e4723f
Sorry, something went wrong.
|
I added a simple test checking the number of require() calls, so that if it changes we notice and can manually review. |
Sorry, something went wrong.
|
It's getting late here, but I'll merge and release this tomorrow morning :) |
Sorry, something went wrong.
There was a problem hiding this comment.
I see, I can reproduce it only when make use-cjs.
Sorry, something went wrong.
Co-authored-by: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
I'm not sure about how to test this, since it's about code there just for backwards compat and not actually used. It just being there unused causes problems for bundlers.
The solution is that we must not have require calls in ESM files unless they are removed in the IS_STANDALONE bundle.