fixed ns imports requiring semicolon (#839)

This commit is contained in:
hydroflame 2021-04-10 02:26:13 -04:00 committed by GitHub
parent 925e96345d
commit 0afdba8f38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

@ -107,7 +107,7 @@ export function _getScriptUrls(script, scripts, seen) {
// import {foo} from "blob://<uuid>"
//
// Where the blob URL contains the script content.
let transformedCode = script.code.replace(/((?:from|import)\s+(?:'|"))(?:\.\/)?([^'"]+)('|";)/g,
let transformedCode = script.code.replace(/((?:from|import)\s+(?:'|"))(?:\.\/)?([^'"]+)('|")/g,
(unmodified, prefix, filename, suffix) => {
const isAllowedImport = scripts.some(s => s.filename == filename);
if (!isAllowedImport) return unmodified;