[Feature]: Remove Rspack runtime from CommonJS output files
What problem does this feature solve?
Currently, each file in the CommonJS format output contains Rspack's runtime code. Is it possible to remove the Rspack runtime and only use require() to import other modules
What does the proposed API look like?
Generate clean CommonJS files that only use standard require() statements to import dependencies, without embedding Rspack runtime in each file.
Same as #594. This is what we expect to optimize in the future, but currently, the focus of our output optimization is on ESM format. We will draw experience from the ESM optimization to better complete the optimization of CJS outputs. Stay tuned!
Currently, each file in the CommonJS format output contains Rspack's runtime code. Is it possible to remove the Rspack runtime and only use require() to import other modules
Could you specify what's the purpose of this feature request (bundle size or readability or others)?
Currently, each file in the CommonJS format output contains Rspack's runtime code. Is it possible to remove the Rspack runtime and only use require() to import other modules
Could you specify what's the purpose of this feature request (bundle size or readability or others)?
We're hoping to improve bundle size and readability to make them more developer-friendly. Also, since rslib's primary purpose is for building JavaScript libraries, removing the rspack runtime in CJS format would likely align better with its intended use?