feat: 优化构建速度和包大小

This commit is contained in:
zdl
2025-10-13 16:01:17 +08:00
parent 0792a57e6f
commit fae8ef10b1
4 changed files with 447 additions and 6 deletions

View File

@@ -36,6 +36,7 @@
"framer-motion": "^4.1.17",
"fullcalendar": "^5.9.0",
"globalize": "^1.7.0",
"history": "^5.3.0",
"leaflet": "^1.9.4",
"lucide-react": "^0.540.0",
"match-sorter": "6.3.0",
@@ -60,7 +61,7 @@
"react-quill": "^2.0.0-beta.4",
"react-responsive": "^10.0.1",
"react-responsive-masonry": "^2.7.1",
"react-router-dom": "^6.4.0",
"react-router-dom": "^6.30.1",
"react-scripts": "^5.0.1",
"react-scroll": "^1.8.4",
"react-scroll-into-view": "^2.1.3",
@@ -86,9 +87,10 @@
"@types/react-dom": "18.2.0"
},
"scripts": {
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts build && gulp licenses",
"test": "react-scripts test --env=jsdom",
"start": "NODE_OPTIONS='--openssl-legacy-provider --max_old_space_size=4096' craco start",
"build": "NODE_OPTIONS='--openssl-legacy-provider --max_old_space_size=4096' craco build && gulp licenses",
"build:analyze": "NODE_OPTIONS='--openssl-legacy-provider --max_old_space_size=4096' ANALYZE=true craco build",
"test": "craco test --env=jsdom",
"eject": "react-scripts eject",
"deploy": "npm run build",
"lint:check": "eslint . --ext=js,jsx; exit 0",
@@ -96,6 +98,7 @@
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start"
},
"devDependencies": {
"@craco/craco": "^7.1.0",
"ajv": "^8.17.1",
"autoprefixer": "^10.4.21",
"eslint-config-prettier": "8.3.0",
@@ -105,7 +108,10 @@
"postcss": "^8.5.6",
"prettier": "2.2.1",
"react-error-overlay": "6.0.9",
"tailwindcss": "^3.4.17"
"tailwindcss": "^3.4.17",
"ts-node": "^10.9.2",
"webpack-bundle-analyzer": "^4.10.2",
"yn": "^5.1.0"
},
"browserslist": {
"production": [