fix: 前端构建堆调至 6G 并限制 Rollup 并行度
All checks were successful
Build and Deploy Front / deploy (push) Successful in 3m19s
All checks were successful
Build and Deploy Front / deploy (push) Successful in 3m19s
4G 在 CI 上 OOM;6G 给同机 k3s 留余量,maxParallelFileOps=5 压峰值。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
d9185f34ed
commit
1a6fcc1b46
@ -13,10 +13,10 @@
|
||||
"dev": "vite",
|
||||
"dev:test": "vite --mode bcdship-test",
|
||||
"dev:nanafa": "vite --mode nanafa",
|
||||
"build": "cross-env BROWSERSLIST_IGNORE_OLD_DATA=1 node --max-old-space-size=4096 node_modules/vite/bin/vite.js build",
|
||||
"build:prod": "cross-env BROWSERSLIST_IGNORE_OLD_DATA=1 node --max-old-space-size=4096 node_modules/vite/bin/vite.js build --mode production",
|
||||
"build:test": "cross-env BROWSERSLIST_IGNORE_OLD_DATA=1 node --max-old-space-size=4096 node_modules/vite/bin/vite.js build --mode bcdship-test",
|
||||
"build:nanafa": "cross-env BROWSERSLIST_IGNORE_OLD_DATA=1 node --max-old-space-size=4096 node_modules/vite/bin/vite.js build --mode nanafa",
|
||||
"build": "cross-env BROWSERSLIST_IGNORE_OLD_DATA=1 node --max-old-space-size=6144 node_modules/vite/bin/vite.js build",
|
||||
"build:prod": "cross-env BROWSERSLIST_IGNORE_OLD_DATA=1 node --max-old-space-size=6144 node_modules/vite/bin/vite.js build --mode production",
|
||||
"build:test": "cross-env BROWSERSLIST_IGNORE_OLD_DATA=1 node --max-old-space-size=6144 node_modules/vite/bin/vite.js build --mode bcdship-test",
|
||||
"build:nanafa": "cross-env BROWSERSLIST_IGNORE_OLD_DATA=1 node --max-old-space-size=6144 node_modules/vite/bin/vite.js build --mode nanafa",
|
||||
"postbuild": "node scripts/postbuild-cleanup-dist.js",
|
||||
"report": "cross-env REPORT=true pnpm run build",
|
||||
"preview": "npm run build && vite preview --host",
|
||||
|
||||
@ -588,6 +588,8 @@ export default defineConfig(({ mode }) => {
|
||||
reportCompressedSize: false,
|
||||
// 构建输出配置:使用 Vite 默认的代码分割策略,避免过度自定义导致库初始化顺序问题
|
||||
rollupOptions: {
|
||||
// 降低并行读盘峰值,减轻同机 k3s 内存压力(默认偏高)
|
||||
maxParallelFileOps: 5,
|
||||
onwarn(warning, warn) {
|
||||
const message = warning.message || '';
|
||||
if (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user