nitro icon indicating copy to clipboard operation
nitro copied to clipboard

nitro/vite strips `mappings` when generating sourcemaps

Open kevinehosford opened this issue 4 weeks ago • 1 comments

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


kevinehosford avatar Dec 01 '25 22:12 kevinehosford

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.

pi0 avatar Dec 01 '25 23:12 pi0