npx

npm i -D @babel/preset-react

webpack.config.js

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "targets": {
          "chrome": "90"
        },
        "useBuiltIns": "usage"
      }
    ],
    "@babel/preset-react"
  ]
}