Skip to content

Commit

Permalink
fix: limit max old space size when build (opentiny#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
chilingling authored Jul 17, 2024
1 parent b140357 commit 20e7f4f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions designer-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"type": "module",
"scripts": {
"dev": "cross-env VITE_THEME=light vite",
"build:alpha": "cross-env VITE_THEME=light vite build --mode alpha",
"build": "cross-env VITE_THEME=light vite build --mode prod"
"build:alpha": "cross-env NODE_OPTIONS=--max-old-space-size=8192 VITE_THEME=light vite build --mode alpha",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 VITE_THEME=light vite build --mode prod"
},
"dependencies": {
"vue": "^3.4.21",
Expand Down
4 changes: 4 additions & 0 deletions packages/engine-cli/src/commands/generateConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export const generatePackageJson = (name, options, templatePath) => {
/VITE_THEME=[^\s]+/,
`VITE_THEME=${options.theme}`
)
templatePackageJson.scripts['build:alpha'] = templatePackageJson.scripts['build:alpha'].replace(
/VITE_THEME=[^\s]+/,
`VITE_THEME=${options.theme}`
)

return templatePackageJson
}
3 changes: 2 additions & 1 deletion packages/engine-cli/template/designer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"dev": "concurrently 'pnpm:serve:mock' 'pnpm:serve:frontend'",
"serve:frontend": "cross-env VITE_THEME=light vite",
"serve:mock": "node node_modules/@opentiny/tiny-engine-mock/dist/app.js",
"build": "cross-env VITE_THEME=light vite build"
"build:alpha": "cross-env NODE_OPTIONS=--max-old-space-size=8192 VITE_THEME=light vite build --mode alpha",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 VITE_THEME=light vite build --mode prod"
},
"dependencies": {
"vue": "^3.4.21",
Expand Down

0 comments on commit 20e7f4f

Please sign in to comment.