diff --git a/src/compiler/utils/mapped_code.ts b/src/compiler/utils/mapped_code.ts index 58f44d7b8c9..12a3ce1d162 100644 --- a/src/compiler/utils/mapped_code.ts +++ b/src/compiler/utils/mapped_code.ts @@ -251,11 +251,6 @@ export function combine_sourcemaps( if (!map.file) delete map.file; // skip optional field `file` - // When source maps are combined and the leading map is empty, sources is not set. - // Add the filename to the empty array in this case. - // Further improvements to remapping may help address this as well https://github.com/ampproject/remapping/issues/116 - if (!map.sources.length) map.sources = [filename]; - return map; } diff --git a/test/sourcemaps/samples/preprocessed-no-map/_config.js b/test/sourcemaps/samples/preprocessed-no-map/_config.js index 78b0ee626f2..9888b56ddf8 100644 --- a/test/sourcemaps/samples/preprocessed-no-map/_config.js +++ b/test/sourcemaps/samples/preprocessed-no-map/_config.js @@ -1,5 +1,5 @@ export default { - css_map_sources: ['input.svelte'], + css_map_sources: [], preprocess: [ { style: ({ content }) => {