From e3609b6d8a1e6a6274270e582e0422ff197a8785 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sat, 14 Nov 2020 02:44:33 +0100 Subject: [PATCH] fix: exec require before return --- packages/nitro/src/rollup/dynamic-require.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nitro/src/rollup/dynamic-require.ts b/packages/nitro/src/rollup/dynamic-require.ts index 36602e520d..d33082f123 100644 --- a/packages/nitro/src/rollup/dynamic-require.ts +++ b/packages/nitro/src/rollup/dynamic-require.ts @@ -28,7 +28,7 @@ ${imports.map(i => ` ['${i.id}']: () => require('./${chunksDir}/${i.id}')`).join }; export default function dynamicRequire(id) { - return dynamicChunks[id]; + return dynamicChunks[id](); };` // const TMPL_CJS = ({ chunksDir }) => `export default function dynamicRequire(id) {