|
|
|
@ -96,9 +96,9 @@ export class ImportResolver { |
|
|
|
|
} |
|
|
|
|
const builtinHandlers: Handler[] = this.getHandlers() |
|
|
|
|
const handlers: Handler[] = customHandlers ? [...builtinHandlers, ...customHandlers] : [...builtinHandlers] |
|
|
|
|
handlers.forEach(handler => { |
|
|
|
|
const matchedHandler = handlers.filter(handler => handler.match(filePath)) |
|
|
|
|
const handler: Handler = matchedHandler[0] |
|
|
|
|
const match = handler.match(filePath) |
|
|
|
|
if(match) { |
|
|
|
|
const content: any = handler.handle(match) |
|
|
|
|
imported = { |
|
|
|
|
content, |
|
|
|
@ -106,8 +106,6 @@ export class ImportResolver { |
|
|
|
|
type: handler.type |
|
|
|
|
} |
|
|
|
|
this.previouslyHandled[filePath] = imported |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
return imported |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|