[fix] add filename to combined source map if needed (#6089)

pull/7738/head
Simon H 5 years ago committed by GitHub
parent adf4e9a60e
commit 285029ac79

@ -251,6 +251,11 @@ 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;
}

@ -1,5 +1,5 @@
export default {
css_map_sources: [],
css_map_sources: ['input.svelte'],
preprocess: [
{
style: ({ content }) => {

Loading…
Cancel
Save