Attempt at logging line number on netscript error

This commit is contained in:
Olivier Gagnon
2021-03-10 01:27:14 -05:00
parent 1b8214b6fa
commit e2a353fc8a
4 changed files with 80 additions and 48 deletions
+1
View File
@@ -38,6 +38,7 @@ export async function executeJSScript(scripts = [], workerScript) {
// load fully dynamic content. So we hide the import from webpack
// by placing it inside an eval call.
urls = _getScriptUrls(script, scripts, []);
script.url = urls[urls.length - 1].url;
script.module = new Promise(resolve => resolve(eval('import(urls[urls.length - 1].url)')));
script.dependencies = urls.map(u => u.filename);
}