Skip to content

Commit

Permalink
Fix dynamic import
Browse files Browse the repository at this point in the history
  • Loading branch information
nktpro committed Oct 9, 2024
1 parent 50f5ee0 commit 2c26234
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/iac_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 2c26234

Please sign in to comment.