Skip to content

Commit

Permalink
fix: windows test
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Jun 13, 2023
1 parent fec0bee commit b6367ba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/vite/src/node/plugins/css.ts
Expand Up @@ -570,10 +570,11 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
}
if (opts.format === 'es' || opts.format === 'cjs') {
const isEntry = chunk.isEntry && isPureCssChunk
const cssAssetName =
const cssAssetName = normalizePath(
!isEntry && chunk.facadeModuleId
? normalizePath(path.relative(config.root, chunk.facadeModuleId))
: chunk.name
? path.relative(config.root, chunk.facadeModuleId)
: chunk.name,
)

const lang = path.extname(cssAssetName).slice(1)
const cssFileName = ensureFileExt(cssAssetName, '.css')
Expand Down

0 comments on commit b6367ba

Please sign in to comment.