Handling of .babelrc files will break when Babel bug is fixed
callumlocke opened this issue · comments
Currently ESBox has some custom tricks (thanks to @jimthedev) to make it possible to use custom Babel configs.
But I've looked into it more, found some related issues on Babel, and realised the ideal design is probably this:
.babelrc
files (and also package.json files with babel config in them) should just work in ESBox, exactly the same as they do with Babel – user should not have to add a--babelrc
flag.- (if a user has a stray
.babelrc
file they forgot about, and it causes ESBox to break in confusing ways, we can maybe help with an explanation in the compile error printout.)
- (if a user has a stray
- We could also have a
--no-babelrc
flag to explicitly disable.babelrc
files. This basically causesbabelrc: false
to go into the babel-register config options (once this is released). (Could also allow other options to be set like this too.) - There's no need to be able to specify a custom
.babelrc
location – can't see enough reason for this now, and it would be weird that it only applies to the entry script anyway.
The current ESBox code basically hacks around this babel bug and will probably break when that bug gets fixed, so we might need an interim fix to smooth the changeover