Question: does babel-cli ignore node_modules files by default? If so, how can I make it not ignore them?

Asked By
Asked At
2017-11-03 18:26:50

Found 15 possible answers.

User Answered At Possible Answer
loganfsmyth 2017-11-03 18:27:26 babel-node specifically you mean?
yaohan.chen 2017-11-03 18:27:27 I tried putting ignore: [] in .babelrc and it didn't seem to have an effect yeah
loganfsmyth 2017-11-03 18:28:32 it does indeed ignore node_modules, generally the assumption Babel currently makes is that things in node_modules should already have been compiled bu their publisher
clemmy 2017-11-03 18:28:56 Thanks for the tweet @hzoo and @existentialism :slightly_smiling_face: Just curious about how babel-eslint releases work? How often do you guys update the version of babylon it's pointing to? It's currently at 7.0.0-beta.22
hzoo 2017-11-03 18:29:10 uh yeah that one is weird maybe it should go into the monorepo too lol it can just be a patch
yaohan.chen 2017-11-03 18:30:28 is there no way to override that default? With babel-register I can set ignore: false to do that, so why not babel-node?
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

Related Questions