diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-05-26 15:21:15 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-26 15:21:17 -0400 |
commit | 7609df9d4f39dec83c633c23833ab8dfd8103ec1 (patch) | |
tree | 5e5ae82d2aa6e28d820f1ba76d617b5c1b828a5e /os.go | |
parent | cbfb7d872009f302b69a55693b5c1fbdc731be69 (diff) |
Support async/await by including ES2017
This required adjusting the module loading system.
Diffstat (limited to 'os.go')
-rw-r--r-- | os.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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") |