-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(nuxt): Don't restrict source map assets upload #13800
Conversation
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.
As discussed yesterday, I think this is fine for now. We should find a way to deal with the duplucate uploads in the plugin but for now this is more a performance/bandwith problem than a functional problem.
packages/nuxt/src/vite/sourceMaps.ts
Outdated
@@ -60,7 +60,7 @@ function normalizePath(path: string): string { | |||
|
|||
function getPluginOptions( | |||
moduleOptions: SentryNuxtModuleOptions, | |||
isNitro = false, | |||
_isNitro = false, |
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.
l: do we still need this param? If not, let's remove it
packages/nuxt/src/vite/sourceMaps.ts
Outdated
assets: | ||
sourceMapsUploadOptions.sourcemaps?.assets ?? isNitro ? ['./.output/server/**/*'] : ['./.output/public/**/*'], | ||
// The server/client files are in different places depending on the nitro preset (e.g. '.output/server' or '.netlify/functions-internal/server' | ||
// We cannot determine automatically how the build folder looks like (depends on the preset), so we have to accept that sourcemaps are generated multiple times (with Vite for Nuxt and Rollup for Nitro). |
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.
l: just to clarify for me from our convo yesterday: What we have to live with is that some source maps might be uploaded multiple times. They shouldn't be generated by the bundlers more than once, right?
// We cannot determine automatically how the build folder looks like (depends on the preset), so we have to accept that sourcemaps are generated multiple times (with Vite for Nuxt and Rollup for Nitro). | |
// We cannot determine automatically how the build folder looks like (depends on the preset), so we have to accept that sourcemaps are uploaded multiple times (with Vite for Nuxt and Rollup for Nitro). |
Source maps generated by Vite are only for the Nuxt-part of the application whereas source maps generated by Rollup are only for the Nitro-part of the application. The Nuxt-part of the application has some overlap with the Nitro-part and so it would be nice to specify the client/server folder in the
assets
option, but the output is different for every Nitro preset (the files are always located under a different path).Should fix #13703