Skip to content
Discussion options

You must be logged in to vote

There isn't currently a general startup-wrapper hook that can be composed with framework auto-detection.

Framework detection only runs when the source is .. Supplying desktop.ts switches to explicit-entrypoint mode:

Therefore, during detected-framework HMR, there is no user-owned Deno startup module in which to register win.bind().

For now, use an explicit entrypoint and start the framework server or handler yourself:

const win = new Deno.BrowserWindow();

win.bind("readFile", async (path: string) => {
  return await Deno.readTextFile(path);
});

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by 8
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants