Skip to content

Commit

Permalink
fix(css): strip BOM (fixes #10043) (#10577)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Oct 21, 2022
1 parent 7b81210 commit e0463bd
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 @@ -43,7 +43,8 @@ import {
parseRequest,
processSrcSet,
removeDirectQuery,
requireResolveFromRootWithFallback
requireResolveFromRootWithFallback,
stripBomTag
} from '../utils'
import type { Logger } from '../logger'
import { addToHTMLProxyTransformResult } from './html'
Expand Down Expand Up @@ -353,6 +354,8 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
return
}

css = stripBomTag(css)

const inlined = inlineRE.test(id)
const modules = cssModulesCache.get(config)!.get(id)

Expand Down

0 comments on commit e0463bd

Please sign in to comment.