ensure token is set onActivation

pull/1382/head
yann300 3 years ago
parent bdb9904cf5
commit fbf73b42ec
  1. 5
      libs/remix-core-plugin/src/lib/compiler-content-imports.ts

@ -26,6 +26,10 @@ export class CompilerImports extends Plugin {
this.urlResolver.setGistToken(token, protocol) this.urlResolver.setGistToken(token, protocol)
} }
onActivation () {
this.setToken()
}
isRelativeImport (url) { isRelativeImport (url) {
return /^([^/]+)/.exec(url) return /^([^/]+)/.exec(url)
} }
@ -69,7 +73,6 @@ export class CompilerImports extends Plugin {
let resolved let resolved
try { try {
await this.setToken()
resolved = await this.urlResolver.resolve(url) resolved = await this.urlResolver.resolve(url)
const { content, cleanUrl, type } = resolved const { content, cleanUrl, type } = resolved
self.previouslyHandled[url] = { self.previouslyHandled[url] = {

Loading…
Cancel
Save