From 2c26234826feae4e7b75af822496368ab91eee54 Mon Sep 17 00:00:00 2001 From: Jacky Nguyen Date: Wed, 9 Oct 2024 19:50:07 -0400 Subject: [PATCH] Fix dynamic import --- src/libs/iac_utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/iac_utils.ts b/src/libs/iac_utils.ts index e70a129..4eb4686 100644 --- a/src/libs/iac_utils.ts +++ b/src/libs/iac_utils.ts @@ -17,6 +17,7 @@ import { import { memoize } from "@wok/utils/memoize"; import { parseMultiDocumentsYaml, stringifyYamlRelaxed } from "./yaml_utils.ts"; import { gray } from "@std/fmt/colors"; +import { toFileUrl } from "@std/path/to-file-url"; export interface ImportDef { props: string[]; @@ -407,7 +408,7 @@ export async function checkAndImport(path: string) { throw e; } - return await import(path); + return await import(toFileUrl(path).toString()); } export async function importBundleModule(