This repository was archived by the owner on May 3, 2026. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NX Plugin + Bundle Webpack/Rollup plugins #209
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
NX Plugin + Bundle Webpack/Rollup plugins #209
Changes from all commits
a05445bca1a5bba4bb4750c243b25cb41af1f6adcf1782fdf14091f7a97377bf16672ddbb267faca44726e5e3d1578db7aad3e416245bb392b71f74227921d7883212File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
swc-loaderis a webpack loader and has no place in the rollup-bundle package.swc-loaderis webpack-specific — it integrates SWC into webpack's loader pipeline and cannot be used by rollup. The rollup package already has@swc/coreas a direct runtime dependency; for SWC in rollup you would need a rollup plugin (e.g.rollup-plugin-swc3), not a webpack loader. Removeswc-loaderfrom this package.🐛 Proposed fix
- "swc-loader": "^0.2.7",📝 Committable suggestion
🤖 Prompt for AI Agents
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.
bundleResultleaks when an error is thrown beforeclose()If the
outputs.length === 0guard at line 98 throws, or ifwriteRollupOutput(line 102) rejects, execution jumps directly to the outercatchblock, which only logs and returnsfalse—bundleResult.close()is never called. Rollup'sRollupBuildcan hold open file handles/watchers, so this is a real resource leak for any error path.🛡️ Proposed fix – wrap output processing in try/finally
for (const config of configs) { const bundleResult = await rollup(config); let outputs: OutputOptions[] = []; + try { if (config.output) { outputs = Array.isArray(config.output) ? config.output : [config.output]; } - if (outputs.length === emptyCount) { + if (outputs.length === 0) { throw new Error("Rollup config is missing output settings"); } for (const output of outputs) { await writeRollupOutput(bundleResult, output); } - - await bundleResult.close(); + } finally { + await bundleResult.close(); + } }📝 Committable suggestion
🤖 Prompt for AI Agents
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.