From 4a54cef3a0028d077689554ce8ec7ef2ad16d644 Mon Sep 17 00:00:00 2001 From: Dylan Chong Date: Mon, 18 Dec 2023 13:50:59 +1300 Subject: [PATCH] fix: Cannot read properties of undefined (reading 'ssr') --- packages/commonjs/src/resolve-require-sources.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/commonjs/src/resolve-require-sources.js b/packages/commonjs/src/resolve-require-sources.js index 22d9e3f65..ee3bbece9 100644 --- a/packages/commonjs/src/resolve-require-sources.js +++ b/packages/commonjs/src/resolve-require-sources.js @@ -182,7 +182,7 @@ export function getRequireResolver(extensions, detectCyclesAndConditional, curre return { id: wrapId(childId, EXTERNAL_SUFFIX), allowProxy: false }; } parentMeta.requires.push({ resolved, isConditional }); - await analyzeRequiredModule(parentId, resolved, isConditional, rollupContext.load); + await analyzeRequiredModule(parentId, resolved, isConditional, rollupContext.load.bind(rollupContext)); return { id: childId, allowProxy: true }; }) );