chore: 优化构建方式,加入yapi的id转化插件, 去除splitChunk代码分割
Showing
api.config.js
0 → 100644
... | @@ -8,9 +8,11 @@ | ... | @@ -8,9 +8,11 @@ |
"upload:study": "cross-env PRO_ENV=study taskName=upload yarn scripts:build", | "upload:study": "cross-env PRO_ENV=study taskName=upload yarn scripts:build", | ||
"upload:v2": "cross-env PRO_ENV=v2 taskName=upload yarn scripts:build", | "upload:v2": "cross-env PRO_ENV=v2 taskName=upload yarn scripts:build", | ||
"upload:v2Preview": "cross-env PRO_ENV=v2Preview taskName=upload yarn scripts:build", | "upload:v2Preview": "cross-env PRO_ENV=v2Preview taskName=upload yarn scripts:build", | ||
"upload:v2-demo": "cross-env PRO_ENV=v2-demo taskName=upload yarn scripts:build", | |||
"upload:v2scm": "cross-env PRO_ENV=v2scm taskName=upload yarn scripts:build", | "upload:v2scm": "cross-env PRO_ENV=v2scm taskName=upload yarn scripts:build", | ||
"upload:v2Test": "cross-env PRO_ENV=v2Test taskName=upload yarn scripts:build", | "upload:v2Test": "cross-env PRO_ENV=v2Test taskName=upload yarn scripts:build", | ||
"api": "god-ytt", | "api": "god-ytt", | ||
"testApi": "cross-env PRO_ENV=v2 god-ytt", | |||
"scripts:build": "node scripts/run", | "scripts:build": "node scripts/run", | ||
"scripts:build-yxc": "node scripts/run http://yxc-web-demo.shushangyun.com/api", | "scripts:build-yxc": "node scripts/run http://yxc-web-demo.shushangyun.com/api", | ||
"start:dev": "cross-env NODE_OPTIONS=--max_old_space_size=4096 umi dev", | "start:dev": "cross-env NODE_OPTIONS=--max_old_space_size=4096 umi dev", | ||
... | @@ -18,7 +20,7 @@ | ... | @@ -18,7 +20,7 @@ |
"clean": "rimraf node_modules", | "clean": "rimraf node_modules", | ||
"start": "yarn api && yarn scripts:build && cross-env NODE_OPTIONS=--max_old_space_size=4096 umi dev", | "start": "yarn api && yarn scripts:build && cross-env NODE_OPTIONS=--max_old_space_size=4096 umi dev", | ||
"build": "yarn api && yarn scripts:build && yarn build:clean", | "build": "yarn api && yarn scripts:build && yarn build:clean", | ||
"build:yxc": "yarn api && yarn scripts:build-yxc && umi build", | "build:yxc": "yarn api && yarn scripts:build-yxc && umi bu ild", | ||
"build:analyze": "cross-env NODE_OPTIONS=--max_old_space_size=16384 ANALYZE=1 umi build", | "build:analyze": "cross-env NODE_OPTIONS=--max_old_space_size=16384 ANALYZE=1 umi build", | ||
"build:dev": "pm2 start scripts/devServer.js", | "build:dev": "pm2 start scripts/devServer.js", | ||
"build:clean": "cross-env NODE_OPTIONS=--max_old_space_size=16384 umi build", | "build:clean": "cross-env NODE_OPTIONS=--max_old_space_size=16384 umi build", | ||
... | @@ -27,8 +29,9 @@ | ... | @@ -27,8 +29,9 @@ |
"build:10": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.0.10:9400 yarn build", | "build:10": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.0.10:9400 yarn build", | ||
"build:study": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.207:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.207:9400 yarn build", | "build:study": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.207:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.207:9400 yarn build", | ||
"build:v2": "cross-env PRO_ENV=v2 yarn build", | "build:v2": "cross-env PRO_ENV=v2 yarn build", | ||
"build:v2Preview": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.220:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.220:9400 yarn build", | "build:v2Preview": "cross-env PRO_ENV=v2Preview yarn build", | ||
"build:v2scm": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.220:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.220:9400 yarn build", | "build:v2scm": "cross-env PRO_ENV=v2scm yarn build", | ||
"build:v2-demo": "cross-env PRO_ENV=v2-demo yarn build", | |||
"build:v2Test": "cross-env SITE_ID=1 BACK_GATEWAY=http://lx-pre-gateway.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lx-pre-gateway.shushangyun.com yarn build", | "build:v2Test": "cross-env SITE_ID=1 BACK_GATEWAY=http://lx-pre-gateway.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lx-pre-gateway.shushangyun.com yarn build", | ||
"postinstall": "umi generate tmp", | "postinstall": "umi generate tmp", | ||
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'", | "prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'", | ||
... | @@ -41,8 +44,8 @@ | ... | @@ -41,8 +44,8 @@ |
"start:study": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.207:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.207:9400 yarn start", | "start:study": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.207:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.207:9400 yarn start", | ||
"start:25": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.25:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.25:9400 yarn start", | "start:25": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.25:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.25:9400 yarn start", | ||
"start:v2": "cross-env PRO_ENV=v2 yarn start", | "start:v2": "cross-env PRO_ENV=v2 yarn start", | ||
"start:v2Preview": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.220:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.220:9400 yarn start", | "start:v2Preview": "cross-env PRO_ENV=v2Preview yarn start", | ||
"start:v2scm": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.220:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.220:9400 yarn start" | "start:v2scm": "cross-env PRO_ENV=v2scm yarn start" | ||
}, | }, | ||
"lint-staged": { | "lint-staged": { | ||
"*.{js,jsx,less,md,json}": [ | "*.{js,jsx,less,md,json}": [ | ||
... | @@ -103,6 +106,7 @@ | ... | @@ -103,6 +106,7 @@ |
"sortablejs": "^1.12.0", | "sortablejs": "^1.12.0", | ||
"typescript": "^3.9.7", | "typescript": "^3.9.7", | ||
"umi": "3.5.20", | "umi": "3.5.20", | ||
"umi-plugin-yapi": "1.4.0", | |||
"video-react": "^0.14.1", | "video-react": "^0.14.1", | ||
"yorkie": "^2.0.0" | "yorkie": "^2.0.0" | ||
}, | }, | ||
... | @@ -125,7 +129,7 @@ | ... | @@ -125,7 +129,7 @@ |
"fs-extra": "^9.0.1", | "fs-extra": "^9.0.1", | ||
"glob": "^7.1.6", | "glob": "^7.1.6", | ||
"god-upload-scp": "1.0.1", | "god-upload-scp": "1.0.1", | ||
"god-yapi2ts": "^1.0.0", | "god-yapi2ts": "1.11.0", | ||
"gulp": "^4.0.2", | "gulp": "^4.0.2", | ||
"gulp-git": "^2.10.1", | "gulp-git": "^2.10.1", | ||
"hard-source-webpack-plugin": "^0.13.1", | "hard-source-webpack-plugin": "^0.13.1", | ||
... | ... |
Please
register
or
sign in
to comment