fix: exec require before return

This commit is contained in:
Pooya Parsa 2020-11-14 02:44:33 +01:00
parent f7378db9e0
commit e3609b6d8a

View File

@ -28,7 +28,7 @@ ${imports.map(i => ` ['${i.id}']: () => require('./${chunksDir}/${i.id}')`).join
}; };
export default function dynamicRequire(id) { export default function dynamicRequire(id) {
return dynamicChunks[id]; return dynamicChunks[id]();
};` };`
// const TMPL_CJS = ({ chunksDir }) => `export default function dynamicRequire(id) { // const TMPL_CJS = ({ chunksDir }) => `export default function dynamicRequire(id) {