From 334cd9f6db05b8f90c34bf621bf80f714f0353ce Mon Sep 17 00:00:00 2001 From: patak Date: Fri, 27 May 2022 22:28:22 +0200 Subject: [PATCH] fix: preserve annotations during build deps optimization (#8358) --- packages/vite/src/node/optimizer/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/optimizer/index.ts b/packages/vite/src/node/optimizer/index.ts index 10908caf9072b3..9ee3c6770afbb7 100644 --- a/packages/vite/src/node/optimizer/index.ts +++ b/packages/vite/src/node/optimizer/index.ts @@ -485,7 +485,7 @@ export async function runOptimizeDeps( splitting: true, sourcemap: true, outdir: processingCacheDir, - ignoreAnnotations: true, + ignoreAnnotations: resolvedConfig.command !== 'build', metafile: true, define, plugins: [