From ad68b9c2dff64db30e80ca4ef237ace6de61e647 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 6 Jan 2022 13:37:50 +0530 Subject: [PATCH] resolve remix-tests libs with Localhost workspace --- libs/remix-core-plugin/src/lib/compiler-content-imports.ts | 2 ++ 1 file changed, 2 insertions(+) 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 8c243e37a8..7eab9205ce 100644 --- a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts +++ b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts @@ -146,6 +146,8 @@ export class CompilerImports extends Plugin { const splitted = /([^/]+)\/(.*)$/g.exec(url) const possiblePaths = ['localhost/installed_contracts/' + url] + // pick remix-tests library contracts from '.deps' + if (url.startsWith('remix_')) possiblePaths.push('localhost/.deps/remix-tests/' + url) if (splitted) possiblePaths.push('localhost/installed_contracts/' + splitted[1] + '/contracts/' + splitted[2]) possiblePaths.push('localhost/node_modules/' + url) if (splitted) possiblePaths.push('localhost/node_modules/' + splitted[1] + '/contracts/' + splitted[2])