From 8a8ea1d3aed9db67da47e610d3c66b831815f898 Mon Sep 17 00:00:00 2001 From: Chris Thomas Date: Thu, 4 May 2023 02:55:17 -0400 Subject: [PATCH] fix(ssr): ignore __esModule for ssrExportAll (#13084) --- packages/vite/src/node/ssr/ssrModuleLoader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/ssr/ssrModuleLoader.ts b/packages/vite/src/node/ssr/ssrModuleLoader.ts index 2f9e71f55569bd..09a9b8817cc380 100644 --- a/packages/vite/src/node/ssr/ssrModuleLoader.ts +++ b/packages/vite/src/node/ssr/ssrModuleLoader.ts @@ -189,7 +189,7 @@ async function instantiateModule( function ssrExportAll(sourceModule: any) { for (const key in sourceModule) { - if (key !== 'default') { + if (key !== 'default' && key !== '__esModule') { Object.defineProperty(ssrModule, key, { enumerable: true, configurable: true,