nitro
nitro copied to clipboard
nitro/vite strips `mappings` when generating sourcemaps
Environment
node: v22.16.0 [email protected]
Reproduction
https://github.com/kevinehosford/nitro-tss-sourcemaps
Describe the bug
I notice that when enabling sourcemaps, the maps produced for the nitro build have an empty mappings:"" property. I was not expecting the mappings to be empty when producing sourcemaps.
If I add experimental: { sourcemapMinify: false } to the config then the property is not empty.
Additional context
No response
Logs
This is kinda expected current behavior. Previously this workaround worked well because dependency chunks were seperated but now they are not it is a problem.
We likely have to removal mappings removal bits till supporting full parse and tree-shake.