Merge pull request #7 from FatttSnake/6-unable-to-automatically-resolve-multi-level-dependency-paths
Fix(compiler): Fix multi-level dependency path compilation error BUG
This commit is contained in:
@@ -135,7 +135,12 @@ class Compiler {
|
||||
}
|
||||
}
|
||||
|
||||
const path = importMap.imports[args.path]
|
||||
let path = importMap.imports[args.path]
|
||||
let tempPath = args.path
|
||||
while (!path && tempPath.includes('/')) {
|
||||
tempPath = tempPath.substring(0, tempPath.lastIndexOf('/'))
|
||||
path = args.path.replace(tempPath, importMap.imports[tempPath])
|
||||
}
|
||||
|
||||
if (!path) {
|
||||
throw Error(`Import '${args.path}' not found in Import Map`)
|
||||
|
||||
Reference in New Issue
Block a user