From fbf73b42ecfa6b9ee27c475d130ab60008bab65d Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 15 Jul 2021 16:08:36 +0200 Subject: [PATCH] ensure token is set onActivation --- libs/remix-core-plugin/src/lib/compiler-content-imports.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts index ea4eae6958..3a907fa2b4 100644 --- a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts +++ b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts @@ -26,6 +26,10 @@ export class CompilerImports extends Plugin { this.urlResolver.setGistToken(token, protocol) } + onActivation () { + this.setToken() + } + isRelativeImport (url) { return /^([^/]+)/.exec(url) } @@ -69,7 +73,6 @@ export class CompilerImports extends Plugin { let resolved try { - await this.setToken() resolved = await this.urlResolver.resolve(url) const { content, cleanUrl, type } = resolved self.previouslyHandled[url] = {