Create react app scaffolding does not have a .babelrc file, where should I configure it?

the create react app scaffolding build project does not have a .babelrc file, where should I configure it?
babel-plugin-import the plug-in says to configure it like this:

clipboard.png

but where to create .babelrc, and then need to configure it, or just fill in the content after creation?

Update:
took a look at the babel7 document, but I didn"t understand it much. The boss can help me to guide: https://babel.docschina.org/d.

.
Feb.19,2022

create files with the .babelrc suffix inside the folder. Then configure it in the following format:

{

  "plugins": [
     [
      "transform-runtime",
      {
        "polyfill": false
      }
     ]
   ],
   "presets": [
     [
       "env",
       {
         "modules": false
       }
     ],
     "stage-2",
     "react"
  ]
}


create a .babelrc file directly under the src directory.


if you create a project using create-react-app scaffolding, you need to execute react-scripts eject to pop up the configuration before customizing the configuration. However, the pop-up configuration file is irreversible, that is, it cannot be restored after popup.
if you are not familiar with these configurations, it is recommended that you do not need pop-up configuration. There are many third-party tools. It can be configured without pop-up configuration.
such as react-app-rewired , the antd official document has a complete configuration process, which can be done according to the documentation, or see the official documentation of react-app-rewired .

react-app-rewired
configure load on demand

Menu