Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Babel from using .babelrc

Tags:

babeljs

When requiring('babel/register)() even if I tell it a custom .babelrc path it still loads the original .babelrc too. How can I prohibit it to read .babelrc?

like image 832
catamphetamine Avatar asked Nov 19 '25 09:11

catamphetamine


1 Answers

The answer is this is impossible and therefore you should specify your custom BABEL_ENV each time you're using Babel and in your .babelrc you make an "env" section with configuration for each of your BABEL_ENV

like image 139
catamphetamine Avatar answered Nov 22 '25 04:11

catamphetamine



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!