We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 176c92b commit 4ca2af4Copy full SHA for 4ca2af4
src/compiler/utils/mapped_code.ts
@@ -251,6 +251,11 @@ export function combine_sourcemaps(
251
252
if (!map.file) delete map.file; // skip optional field `file`
253
254
+ // When source maps are combined and the leading map is empty, sources is not set.
255
+ // Add the filename to the empty array in this case.
256
+ // Further improvements to remapping may help address this as well https://github.com/ampproject/remapping/issues/116
257
+ if (!map.sources.length) map.sources = [filename];
258
+
259
return map;
260
}
261
test/sourcemaps/samples/preprocessed-no-map/_config.js
@@ -1,5 +1,5 @@
1
export default {
2
- css_map_sources: [],
+ css_map_sources: ['input.svelte'],
3
preprocess: [
4
{
5
style: ({ content }) => {
0 commit comments