Nuxt sourcemap vs. vite & nitro sourcemap #15028
Replies: 2 comments 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 |
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey @s1gr1d, thank you for making the Nuxt SDK happen!
I'm wondering why the
nuxtConfig.sourcemapoption is not respected when it comes to sourcemap deletion, but thenitroConfig.rollupConfig.output.sourcemapoption.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.sourcemapto be enough, and not to setviteConfig.build.sourcemapandnitroConfig.rollupConfig.output.sourcemap.What about
nitroConfig.sourcemapthen? Isn't it settingnitroConfig.rollupConfig.output.sourcemap?Finally, why is
viteConfig.build.sourcemaptruein 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: truein Nuxt's configuration to be enough. Instead my source files are being deleted asnitroConfig.rollupConfig.output.sourcemapisundefinedregardless of thenuxtConfig.sourcemapsetting. I'm confused.All reactions