Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/compiler/utils/mapped_code.ts
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion 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 }) => {
Expand Down