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
{{ message }}
Repository navigation
Commit d79f44c
Browse filesBrowse the repository at this point in the historyBrowse files
fix(nuxt): Do not inject debug IDs into the SSR build (#25080)
Nuxt server source maps can still resolve to wrong lines (more info in
#18519).
Nitro bundles Nuxt's SSR build again. The Sentry Vite plugin also ran on
the SSR build, so its debug IDs got into Nitro's output. Many server
files used such an ID instead of Nitro's own, and both builds uploaded
different maps under that ID.
The Vite plugin now runs only on the client build. Nitro's plugin
uploads the server maps, which already point to the original sources.
The e2e test now checks that each shipped file has one debug ID,
resolving to exactly one map generated for that file.
Fixes#18974
// Nitro bundles the SSR output again, so debug IDs from the SSR build would point to the wrong maps.
85
+
{dev: false,build: true,server: false},
83
86
);
84
87
}
85
88
@@ -162,7 +165,7 @@ export function getPluginOptions(
162
165
sourcemaps: {
163
166
disable: moduleOptions.sourcemaps?.disable,
164
167
// The server/client files are in different places depending on the nitro preset (e.g. '.output/server' or '.netlify/functions-internal/server')
165
-
// We cannot determine automatically how the build folder looks like (depends on the preset), so we have to accept that source maps are uploaded multiple times (with the vitePlugin for Nuxt and the rollupPlugin for Nitro).
168
+
// We cannot determine automatically how the build folder looks like (depends on the preset), so each plugin uploads its own build output (the vitePlugin for the Nuxt client and the rollupPlugin for Nitro).
166
169
// If we could know where the server/client assets are located, we could do something like this (based on the Nitro preset): isNitro ? ['./.output/server/**/*'] : ['./.output/public/**/*'],
0 commit comments