While testing with bun run index.ts everything looks great with my most basic of apps, however when I run the command to buld a single file exe
bun build --compile --minify --sourcemap ./index.ts --outfile todoapp
the resulting exe (on Windows x64) fails to open and the following error is displayed:
Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item
My index.ts looks like this:
`import { Webview } from "webview-bun";
const html = `
<html>
<body>
<h1>Hello from bun v${Bun.version} !</h1>
<button onclick="addInNode().then((r)=>alert(r))">
Test
</button>
</body>
</html>
`;
const webview = new Webview();
webview.setHTML(html);
console.log("Hello from Node.js !");
webview.bind("addInNode", ()=>{ // The first parameter is the Webview and the rest are user's.
let r = parseInt("1") + parseInt("2"); // This will run in Node.js
console.log(r); // This will run in Node.js
return r; // return the result to webview
});
webview.title="blah";
webview.run();`
While testing with
bun run index.ts
everything looks great with my most basic of apps, however when I run the command to buld a single file exebun build --compile --minify --sourcemap ./index.ts --outfile todoapp
the resulting exe (on Windows x64) fails to open and the following error is displayed:
My index.ts looks like this:
Does anyone know what might be happening?