From 48ff05b12bbdaf64081bbe9778c0c663dff53075 Mon Sep 17 00:00:00 2001 From: garrettmills Date: Sat, 5 Sep 2020 09:42:10 -0500 Subject: [PATCH] Make canonical use file:// prefix --- lib/src/unit/Canonical.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/unit/Canonical.ts b/lib/src/unit/Canonical.ts index 91689a9..d941d38 100644 --- a/lib/src/unit/Canonical.ts +++ b/lib/src/unit/Canonical.ts @@ -132,6 +132,10 @@ export class Canonical extends LifecycleUnit { .substr(this.suffix.length) .split('').reverse().join('') + if ( file_path.startsWith('/') ) { + file_path = `file://${file_path}` + } + this.make(Logging).debug(`Importing from: ${file_path}`) const imported = await import(file_path) return { canonical_name, original_name, imported }