解析 JSX 语法

npx

npm i -D @babel/preset-react

webpack.config.js

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

posted on 2021-09-10 10:44  aisowe  阅读(91)  评论(0编辑  收藏  举报

导航