Skip to content

Commit

Permalink
chore: revert changes to utils.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Lino Le Van authored and Lino Le Van committed Dec 23, 2023
1 parent 0da007c commit 26d2b17
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ export async function importBuild(entrypoint: string) {
jsxImportSource: "https://esm.sh/preact@10.19.3",
jsx: "automatic",
});
const file = new TextDecoder().decode(result.outputFiles[0].contents);

const tempFilePath = await Deno.makeTempFile();
await Deno.writeFile(tempFilePath, result.outputFiles[0].contents);
return await import(tempFilePath);
return await import(
"data:text/javascript;base64," + btoa(file)
);
}

0 comments on commit 26d2b17

Please sign in to comment.