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 0d199a001f..30d31e054f 100644 --- a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts +++ b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts @@ -44,6 +44,7 @@ export class CompilerImports extends Plugin { return {} } }) + this.on('filePanel', 'setWorkspace', () => this.urlResolver.clearCache()) } async setToken () { diff --git a/libs/remix-url-resolver/src/resolve.ts b/libs/remix-url-resolver/src/resolve.ts index 135ff05b14..4abfd53bcb 100644 --- a/libs/remix-url-resolver/src/resolve.ts +++ b/libs/remix-url-resolver/src/resolve.ts @@ -42,6 +42,10 @@ export class RemixURLResolver { this.protocol = protocol } + clearCache () { + this.previouslyHandled = {} + } + /** * Handle an import statement based on github * @param root The root of the github import statement