Skip to content

Commit 973087f

Browse files
authored
fix: set viteMetadata for writeBundle hook (#263)
1 parent e418d5e commit 973087f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/node/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ function wrapEnvironmentHook<HookName extends keyof Plugin>(
13171317
if (hookName === 'augmentChunkHash') {
13181318
injectChunkMetadata(chunkMetadataMap, args[0])
13191319
}
1320-
if (hookName === 'generateBundle') {
1320+
if (hookName === 'generateBundle' || hookName === 'writeBundle') {
13211321
const bundle = args[1] as OutputBundle
13221322
for (const chunk of Object.values(bundle)) {
13231323
if (chunk.type === 'chunk') {

0 commit comments

Comments
 (0)