Question: is there no way to override that default? With babel-register I can set ignore: false to do that, so why not babel-node?

Asked By
Asked At
2017-11-03 18:30:28

Found 15 possible answers.

User Answered At Possible Answer
loganfsmyth 2017-11-03 18:32:12 Generally for the more complex cases, I just recommend people use babel-register we never recommend it for production usecases babel-node only really exists as a simple way for people to run local scripts
hzoo 2017-11-03 18:32:33 (to be honest I think it should because when we update babylon we need to update babel-eslint too)
loganfsmyth 2017-11-03 18:33:20 we also barely recommend babel-register for that, but at least using that is more consistent.
hzoo 2017-11-03 18:34:10 also @clemmy sounds like everyone is asking why it's not just an array instead of React.Fragment
existentialism 2017-11-03 18:34:17 @yaohan.chen did u try babel-node’s -i/--ignore flag? or does that not work anymore?
loganfsmyth 2017-11-03 18:34:45 On Babel 6 that flag is so garbage that I don't even know what you'd set it to
existentialism 2017-11-03 18:34:50 lol hence the fixes in 7 thats right
loganfsmyth 2017-11-03 18:35:05 On Babel beta it might work do to --ignore with no value, but I'd have to try it to see
yaohan.chen 2017-11-03 18:36:16 ah, --ignore '' seems to work
loganfsmyth 2017-11-03 18:36:34 I'm kind of surprised but cool :stuck_out_tongue: mind if I ask your usecase for not having node_modules already compiled?
yaohan.chen 2017-11-03 18:37:23 except I actually had to use function for ignore with babel-register, because babel-preset-env doesn't seem to like being not ignored or whatever "async function" is two of my dependencies use es7 syntax
loganfsmyth 2017-11-03 18:38:41 ah are you stuck on Node 4? using a more recent Node version would fix that
yaohan.chen 2017-11-03 18:40:24 yeah, "production" will be Node 4, and it's not a very serious project so I'm not worried about penalties from using babel
loganfsmyth 2017-11-03 18:41:13 I'd definitely recommend updating. Node 4 does out of support in 6 months I'd expect many modules to drop support Node 4 entirely
hzoo 2017-11-03 18:42:02 (what about babel lol)

Related Questions