/node_modules/
. We need to make a regex that excludes node_modules except the specific ones that should be transpiled:babel.config.js
to configure Babel over .babelrc
. If you want to transpile node_modules
(which is now becoming a very common case with webapps), then you should use babel.config.js
..babelrc
can be overridden by another .babelrc
belonging to a node_module that you’re transpiling and that can lead to all sorts of weird issues.