revert dynamic ram miscalc

This commit is contained in:
Olivier Gagnon 2021-10-14 17:20:13 -04:00
parent 3d97f2d770
commit dda6235591
3 changed files with 3 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -28,8 +28,7 @@ export async function executeJSScript(scripts: Script[] = [], workerScript: Work
// but not really behaves like import. Particularly, it cannot
// load fully dynamic content. So we hide the import from webpack
// by placing it inside an eval call.
await script.updateRamUsage(scripts);
workerScript.ramUsage = script.ramUsage;
script.markUpdated();
uurls = _getScriptUrls(script, scripts, []);
script.url = uurls[uurls.length - 1].url;
script.module = new Promise((resolve) => resolve(eval("import(uurls[uurls.length - 1].url)")));