Skip to content

Commit

Permalink
chore:prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
frank authored and frank committed Jun 24, 2022
1 parent 806d24d commit cb947be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,10 @@ function rewriteCssUrls(
const inLess = file?.endsWith('.less')
const inSass = file?.endsWith('.sass')
const inScss = file?.endsWith('.scss')
if (inLess && rawUrl.startsWith('@') || (inSass || inScss) && rawUrl.startsWith('$')) {
if (
(inLess && rawUrl.startsWith('@')) ||
((inSass || inScss) && rawUrl.startsWith('$'))
) {
return `url('${rawUrl}')`
}
return await doUrlReplace(rawUrl, matched, replacer)
Expand Down

0 comments on commit cb947be

Please sign in to comment.