Skip to content

Commit

Permalink
chore: fix worker sourcemap output style (#7805)
Browse files Browse the repository at this point in the history
  • Loading branch information
poyoho committed Apr 19, 2022
1 parent 7f96b26 commit 17f3be7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/vite/src/node/plugins/reporter.ts
Expand Up @@ -184,10 +184,15 @@ export function buildReporterPlugin(config: ResolvedConfig): Plugin {
}
} else if (chunk.source) {
const isCSS = chunk.fileName.endsWith('.css')
const isMap = chunk.fileName.endsWith('.js.map')
printFileInfo(
chunk.fileName,
chunk.source,
isCSS ? WriteType.CSS : WriteType.ASSET,
isCSS
? WriteType.CSS
: isMap
? WriteType.SOURCE_MAP
: WriteType.ASSET,
longest,
isCSS ? await getCompressedSize(chunk.source) : undefined
)
Expand Down

0 comments on commit 17f3be7

Please sign in to comment.