Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Commit

Permalink
fix(core): to relying on import alias "@" to fix deployment error
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelrk committed Feb 6, 2024
1 parent 7227ec6 commit 70f9aa3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/core/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,13 @@ export const Netzo = async (config: Partial<NetzoConfig>) => {
const { default: dev } = await import("$fresh/dev.ts");
return dev(Deno.mainModule, "./netzo.ts", config);
} else {
const manifestURL = import.meta.resolve("@/fresh.gen.ts");
return start((await import(manifestURL)).default, config);
// FIXME: the fix introduced in is causing deploytime error
// "The deployment failed: UNCAUGHT_EXCEPTION TypeError: module
// not found: 'file:///src/fresh.gen.ts' at async Object.start()"
// so we revert to relying on import alias "@" for now despite
// this breaking types in development. This is a temporary fix
// see https://github.com/netzo/netzo/issues/85#issuecomment-1929225550
return start((await import("@/fresh.gen.ts")).default, config);
}
}, // NOTE: async but won't resolve (since dev/start won't) so we can't await it
};
Expand Down

0 comments on commit 70f9aa3

Please sign in to comment.