-
-
Notifications
You must be signed in to change notification settings - Fork 53
fix: enlarge rollup build memory limit #1468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -23,7 +23,8 @@ | |||||
| "build:generate-exports": "node scripts/generate-exports.cjs", | ||||||
| "build:css": "npm run generate-tokens && npm run bundle-tokens && npm run build-css", | ||||||
| "build:components": "npm run compile-components && npm run process-components", | ||||||
| "build:rollup": "npm run prebuild && npm run build:css && NODE_OPTIONS='--max-old-space-size=4076' npm run build:components && npm run build:generate-exports", | ||||||
| "build:rollup": "NODE_OPTIONS='--max-old-space-size=8192' npm run build:rollup:process", | ||||||
| "build:rollup:process": "npm run prebuild && (npm run build:css & npm run build:components & wait) && npm run build:generate-exports", | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Make the parallel step cross‑platform (replace The current subshell/background syntax is Bash-only and will fail on Windows runners. Use a cross-platform runner like Apply one of these diffs: Option A (npm-run-all): -"build:rollup:process": "npm run prebuild && (npm run build:css & npm run build:components & wait) && npm run build:generate-exports",
+"build:rollup:process": "npm run prebuild && npm-run-all -p build:css build:components && npm run build:generate-exports",Option B (concurrently): -"build:rollup:process": "npm run prebuild && (npm run build:css & npm run build:components & wait) && npm run build:generate-exports",
+"build:rollup:process": "npm run prebuild && concurrently \"npm run build:css\" \"npm run build:components\" && npm run build:generate-exports",If you choose one, add the corresponding devDependency ( 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| "compile-components:esbuild": "node build-components.cjs", | ||||||
| "check:types": "tsc --noEmit", | ||||||
| "build-components:esbuild": "npm run compile-components:esbuild && npm run process-components", | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Ensure parallel rollup steps fail when any subcommand fails
The new
build:rollup:processscript backgroundsnpm run build:cssandnpm run build:componentsand then callswait. In POSIX shellswaitwithout arguments returns the exit status of the last job to finish, so if the job that fails happens to finish first, the overall script will still exit 0 and the build proceeds as if everything succeeded. That means the rollup build can silently pass while either the CSS or component build has failed. Consider capturing each job’s PID and checking both exit codes (or using a helper likenpm-run-all) so the script fails whenever either subcommand does.Useful? React with 👍 / 👎.