From 7609df9d4f39dec83c633c23833ab8dfd8103ec1 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 26 May 2018 15:21:15 -0400 Subject: Support async/await by including ES2017 This required adjusting the module loading system. --- os.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'os.go') diff --git a/os.go b/os.go index 5a96516ea..d1923837e 100644 --- a/os.go +++ b/os.go @@ -76,14 +76,18 @@ func HandleCodeFetch(moduleSpecifier string, containingFile string) (out []byte) return } - //println("HandleCodeFetch", "moduleSpecifier", moduleSpecifier, - // "containingFile", containingFile, "filename", filename) + logDebug("HandleCodeFetch moduleSpecifier %s containingFile %s filename %s", + moduleSpecifier, containingFile, filename) if isRemote(moduleName) { sourceCodeBuf, err = FetchRemoteSource(moduleName, filename) } else if strings.HasPrefix(moduleName, assetPrefix) { f := strings.TrimPrefix(moduleName, assetPrefix) sourceCodeBuf, err = Asset("dist/" + f) + if err != nil { + logDebug("%s Asset doesn't exist. Return without error", moduleName) + err = nil + } } else { assert(moduleName == filename, "if a module isn't remote, it should have the same filename") -- cgit v1.2.3