From 3c9a7ea94e63c6b047e1a958369c121625e13064 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Sun, 25 Jul 2021 10:32:48 -0700 Subject: [PATCH] Revert "[fix] add filename to combined source map if needed (#6089)" This reverts commit 4ca2af41df436ef97cd1953eb67c2c4922a8257b. --- src/compiler/utils/mapped_code.ts | 5 ----- test/sourcemaps/samples/preprocessed-no-map/_config.js | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/compiler/utils/mapped_code.ts b/src/compiler/utils/mapped_code.ts index 58f44d7b8c9f..12a3ce1d162a 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 78b0ee626f2a..9888b56ddf8f 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 }) => {