sveltejs / vite-plugin-svelte

Svelte plugin for http://vitejs.dev/
MIT License
819 stars 99 forks source link

Remove unnecessary enableSourcemap usage #862

Closed bluwy closed 4 months ago

bluwy commented 4 months ago

enableSourcemap for styles was disabled in SSR due to a caveat with Vite <5 static env replacement, but since Vite 5, we don't have to workaround that anymore. So the enableSourcemap setting for it can be removed. Tests were added in https://github.com/sveltejs/vite-plugin-svelte/pull/201. In practice, this shouldn't incur a perf hit.

We also use enableSourcemap in another place - the advanced queries. Since Svelte 5, the option was deprecated:

The enableSourcemap option has been removed. Source maps are always generated now, and tooling can choose to ignore them.

So I disabled it for Svelte 5. We could also completely remove in for Svelte 4, but I didn't want to change too much.