From a4d75bc0ad97cd019a101ff62ea12c808bdecc21 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Fri, 28 Jan 2022 07:44:16 +0100 Subject: [PATCH] chore: update --- packages/vite/src/node/plugins/splitVendorChunk.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/vite/src/node/plugins/splitVendorChunk.ts b/packages/vite/src/node/plugins/splitVendorChunk.ts index 7973cb499679ca..09246e14e35234 100644 --- a/packages/vite/src/node/plugins/splitVendorChunk.ts +++ b/packages/vite/src/node/plugins/splitVendorChunk.ts @@ -22,9 +22,10 @@ export class SplitVendorChunkCache { } } -export function splitVendorChunk({ - cache = new SplitVendorChunkCache() -} = {}): GetManualChunk { +export function splitVendorChunk( + options: { cache?: SplitVendorChunkCache } = {} +): GetManualChunk { + const cache = options.cache ?? new SplitVendorChunkCache() return (id, { getModuleInfo }) => { if ( id.includes('node_modules') &&