This pull request fixes a couple errors I hit when setting { compilerOptions: { enableSourcemap: false } }. At different places, the loader code assumes that each of js.map and css.map are non-null. Both errors are triggered in the added tests.
(I assume that disabling sourcemaps at the Svelte level rather than through the webpack config is uncommon. In my case, I was disabling CSS sourcemaps for Svelte specifically in order to work around some issues with preprocessor map handling. I found the JS sourcemap error in the course of fixing the CSS error.)
This pull request fixes a couple errors I hit when setting
{ compilerOptions: { enableSourcemap: false } }
. At different places, the loader code assumes that each ofjs.map
andcss.map
are non-null. Both errors are triggered in the added tests.(I assume that disabling sourcemaps at the Svelte level rather than through the webpack config is uncommon. In my case, I was disabling CSS sourcemaps for Svelte specifically in order to work around some issues with preprocessor map handling. I found the JS sourcemap error in the course of fixing the CSS error.)