react-app-rewired 修改 react 项目默认端

2022-04-12  本文已影响0人  光剑书架上的书

package.json

设置: "dev": "PORT=8888 react-app-rewired start"

如下:

{
  "name": "arco-design-pro",
  "version": "1.0.0",
  "description": "Arco Design Pro",
  "scripts": {
    "start": "react-app-rewired start",
    "dev": "PORT=8888 react-app-rewired start",
    "build": "react-app-rewired build",
    "eject": "react-scripts eject",
    "eslint": "eslint src/ --ext .ts,.tsx,.js,.jsx --fix --cache",
    "stylelint": "stylelint 'src/**/*.less' 'src/**/*.css' --fix --cache",
    "pre-commit": "pretty-quick --staged && npm run eslint && npm run stylelint",
    "prepare": "husky install && husky add .husky/pre-commit 'npm run pre-commit'"
  }
}
上一篇 下一篇

猜你喜欢

热点阅读