- Instant help with your JavaScript coding problems

Where are the config files created by create-react-app

Nowadays, perhaps the easiest way to start react-based development is to use the create-react-app. React applications can be developed immediately without any configuration. However, as we try to solve increasingly complex tasks, sooner or later we will need to fine-tune the current settings like webpack config. And then comes the surprise that we can't find the configuration files in the project directory.

Where is the webpack config

Normally, the webpack config file is located at the root of the project. However, create-react-app hides the settings from us. The good news is that the files are easy to find, but unfortunately not so easy to modify.

If you look at the contents of the packages.json file, you can see that the scripts reference the react-scripts module.

And now let's see what we can find in the react-scripts module. Open the node_modules folder in your project and locate the react-scripts subdirectory. There is a config directory in this module and there is the webpack.config.js file you are looking for.

You should see something similar:

So the settings you are looking for can be found here:

PROJECT-HOME/node_modules/react-scripts/config/webpack.config.js

Share "Where are the config files created by create-react-app" with your friends