I am new on a pretty big ReactJS project. On top level, it does not have the usual webpack.config.js
, but only a `webpack.config.babel.js'. That this one does indeed get used I can verify, when running
> webpack
gets called (through npm run
with NODE_ENV=development and WEBPACK_CONFIG=server_dev², but that should not matter much).
Why is that so?
a) If I remove that babel-config, I get a rightful complaint, that:
A configuration file could be named 'webpack.config.js' in the current directory.
b) If, instead, I add my own do-almost-nothing webpack.config.js
that one indeed “rules” (with webpack.config.babel.js
no longer being used).
So, apparently, there's an “invible” default webpack.config.js
that kicks in, if this file is missing. And again, apparently?, this default configuration somehow caters to the webpack-configuration? By what? By virtue of having those node-modules installed?
Or is .babelrc
a marker file of sorts to webpack?
Interestingly, this project, preact-www
project has the same thing. (nor original webpack config, but the webpack flavour). So they know something, I don't...