Make canonical use file:// prefix
This commit is contained in:
parent
59975830e7
commit
48ff05b12b
@ -132,6 +132,10 @@ export class Canonical<T> extends LifecycleUnit {
|
|||||||
.substr(this.suffix.length)
|
.substr(this.suffix.length)
|
||||||
.split('').reverse().join('')
|
.split('').reverse().join('')
|
||||||
|
|
||||||
|
if ( file_path.startsWith('/') ) {
|
||||||
|
file_path = `file://${file_path}`
|
||||||
|
}
|
||||||
|
|
||||||
this.make(Logging).debug(`Importing from: ${file_path}`)
|
this.make(Logging).debug(`Importing from: ${file_path}`)
|
||||||
const imported = await import(file_path)
|
const imported = await import(file_path)
|
||||||
return { canonical_name, original_name, imported }
|
return { canonical_name, original_name, imported }
|
||||||
|
Loading…
Reference in New Issue
Block a user