Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| ], | ||
| { dev: false, build: true }, // Only add source map plugin during build | ||
| ); | ||
| } |
There was a problem hiding this comment.
Vite plugin options read before modules:done hook mutates them
High Severity
getPluginOptions(moduleOptions, shouldDeleteFilesFallback) is now called synchronously at setup time (line 89), before the modules:done hook (line 43) has a chance to mutate shouldDeleteFilesFallback. Since shouldDeleteFilesFallback starts as { client: true, server: true }, filesToDeleteAfterUpload will always include the default deletion globs — even when the user explicitly enabled source maps (where it should be undefined). Previously this call was deferred inside the Vite plugin's config() hook, which ran after modules:done. The test at line 182 was updated to assert the now-broken behavior instead of catching the regression.
Additional Locations (2)
size-limit report 📦
|
| }); | ||
|
|
||
| it('uses mutated shouldDeleteFilesFallback (explicitly enabled → false): plugin.config() after modules:done gets no filesToDeleteAfterUpload', async () => { | ||
| it('sentryVitePlugin is called with fallback filesToDeleteAfterUpload even when source maps are explicitly enabled', async () => { |
There was a problem hiding this comment.
q: Double checking: we do want to delete defaultFilesToDeleteAfterUpload even if the user has explicitly enabled SM?


We were pushing the Sentry plugin to the Vite plugins array dynamically inside the
config()hook of a wrapper plugin (addVitePluginfrom Nuxt). The Sentry plugin was not added reliably as it was nested in this wrapper plugin. This prevented the client bundle source map upload phase from triggering.closes #19743