ant 版本和 react 版本

发布时间 2023-05-30 10:34:52作者: vx_guanchaoguo0

版本要求

React 16.
Antd 4.0.
Node v7.9.0.
NPM v4.2.0.
Typescript es2015.

package.json

{
  "name": "react-16-typescript",
  "version": "1.0.0",
  "description": "",
  "keywords": [],
  "main": "src/index.tsx",
  "dependencies": {
    "react": "16.8.5",
    "react-dom": "16.8.5",
    "react-scripts": "4.0.3"
  },
  "devDependencies": {
    "@types/react": "17.0.20",
    "@types/react-dom": "17.0.9",
    "typescript": "4.4.2"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}

tsconfig.json

{
    "include": [
        "./src/**/*"
    ],
    "compilerOptions": {
        // "strict": true,
        "esModuleInterop": true,
        "lib": [
            "dom",
            "es2015"
        ],
        "jsx": "react-jsx"
    }
}