Nuxt sourcemap vs. vite & nitro sourcemap #15028
Replies: 1 comment 1 reply
-
Hello, thanks for reaching out.
I agree that the source maps settings for Nuxt are a bit complicated as there are so many. However, we have to make sure that the SDK respects the user-settings but also generate "hidden" source-maps if there is nothing set. Nevertheless, the setup could be improved here. I will take a look at this again. We would need to create some sort of options hierarchy to improve this. Like if someone sets |
Beta Was this translation helpful? Give feedback.
-
Hey @s1gr1d, thank you for making the Nuxt SDK happen!
I'm wondering why the
nuxtConfig.sourcemap
option is not respected when it comes to sourcemap deletion, but thenitroConfig.rollupConfig.output.sourcemap
option.Also in feat(nuxt): Respect user-provided source map generation settings #14020 you mention that all 3 sourcemap options need to be set, I'm wondering why? I expected
nuxtConfig.sourcemap
to be enough, and not to setviteConfig.build.sourcemap
andnitroConfig.rollupConfig.output.sourcemap
.What about
nitroConfig.sourcemap
then? Isn't it settingnitroConfig.rollupConfig.output.sourcemap
?Finally, why is
viteConfig.build.sourcemap
true
in the default Nuxt configuration, even without settingnuxtConfig.sourcemap
? I thought Nuxt's default is{ "server": true, "client": false }
and vite stems fromclient
?I've created a stackblitz to tinker with this: https://stackblitz.com/edit/github-rlsfchm3?file=nuxt.config.ts
Again, I would've expected that setting
sourcemap: true
in Nuxt's configuration to be enough. Instead my source files are being deleted asnitroConfig.rollupConfig.output.sourcemap
isundefined
regardless of thenuxtConfig.sourcemap
setting. I'm confused.Beta Was this translation helpful? Give feedback.
All reactions