Skip to content

Commit

Permalink
fix(vite): properly escape css injected intro js chunk, close #1244
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 12, 2022
1 parent ccd3cff commit ad93f5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vite/src/modes/global/build.ts
Expand Up @@ -187,6 +187,8 @@ export function GlobalModeBuildPlugin({ uno, ready, extract, tokens, filter, get
? result.getLayers(undefined, Array.from(vfsLayers))
: result.getLayer(layer) || ''
return css
.replace(/\n/g, '')
.replace(/(?<!\\)(['"])/g, '\\$1')
})
}
}
Expand Down

0 comments on commit ad93f5f

Please sign in to comment.