You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering high memory usage with the RsBuild dev server & production build as well. I cannot effectively limit it, despite setting the NODE_OPTIONS=--max-old-space-size environment variable as recommended in the Rsbuild documentation.
However, monitoring memory usage via the Activity Monitor shows it consistently exceeds 5 GB, regardless of these settings.
The text was updated successfully, but these errors were encountered:
Ayush048
changed the title
[Bug]: Uncontrolled memory consumption during production build usign RSBuild
[Bug]: Uncontrolled memory consumption during production build using RSBuild
Jan 7, 2025
Version
Details
I'm encountering high memory usage with the RsBuild dev server & production build as well. I cannot effectively limit it, despite setting the NODE_OPTIONS=--max-old-space-size environment variable as recommended in the Rsbuild documentation.
However, monitoring memory usage via the Activity Monitor shows it consistently exceeds 5 GB, regardless of these settings.
Relevant Tech Stack: node: v18.17.0 yarn: v1.22.22 react: v18.2 @rsbuild/core: v1.1.10 typeScript: v4.9.4
Device Specs: OS: macOS Sequoia (v15.0) RAM: 16 GB
I’ve attempted to restrict memory consumption using the following methods:
Using Node and executing rebuild file directly,
"script":{ "build": "node --max-old-space-size=4096 ./node_modules/@rsbuild/core/bin/rsbuild.js build" }
Using NODE_OPTIONS,
"script":{ "build": "NODE_OPTIONS=--max_old_space_size=4096 rsbuild build" }
Setting the environment variable in the rsbuild.config.js file,
process.env.NODE_OPTIONS = '--max-old-space-size=4096'
Even tried using different rsbuild versions as well, like v1.1.4, v1.1.6, v1.1.10, v1.2.0-alpha.0
Reproduce link
NA
Reproduce Steps
In my case, I am migrating my project from the webpack using rebuild.
Project TechStake: React, Typescript.
Number of files in project: 6.7k
Please find below my rsbuild.config.js
The text was updated successfully, but these errors were encountered: