From a3fb5372b21450833cc267bc551f2a589a2b52f8 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 --- src/rollup/dynamic-require.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rollup/dynamic-require.ts b/src/rollup/dynamic-require.ts index 36602e520d..d33082f123 100644 --- a/src/rollup/dynamic-require.ts +++ b/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) {