解析 JSX 语法
npx
npm i -D @babel/preset-react
webpack.config.js
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": "90"
},
"useBuiltIns": "usage"
}
],
"@babel/preset-react"
]
}