Skip to content

Commit

Permalink
css: always emit mappings for symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Jul 16, 2023
1 parent 78d9bbe commit 002e020
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/css_printer/css_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,11 @@ func (p *printer) printSymbol(loc logger.Loc, ref ast.Ref, mode identMode, white
name, ok := p.options.LocalNames[ref]
if !ok {
name = originalName
} else if p.options.AddSourceMappings && name != originalName {
}
if p.options.AddSourceMappings {
if originalName == name {
originalName = ""
}
p.builder.AddSourceMapping(loc, originalName, p.css)
}
p.printIdent(name, mode, whitespace)
Expand Down

0 comments on commit 002e020

Please sign in to comment.