tr1ckydev / webview-bun

Bun bindings for webview, a tiny library for creating web-based desktop GUIs.
https://www.npmjs.com/package/webview-bun
MIT License
201 stars 8 forks source link

support compiling apps #9

Closed terrablue closed 3 months ago

terrablue commented 3 months ago

Hi, this pull request allows you to compile apps with webview-bun by embedding the library directly into the app.

This only works if the import is statically analyzable during compilation, which hasn't been the case thus far. I solved this by creating a symlink to the downloaded library that is called the same way on every platform.

Not tested on Mac/Windows.

This solves #6.

ralyodio commented 3 months ago

I need this asap!

terrablue commented 3 months ago

For more info, see https://github.com/oven-sh/bun/issues/11732

robinjac commented 2 months ago

Hey man! Tried on MacOS darwin arm64. Works🍻

Awesome work!

ralyodio commented 2 months ago

it's fixed?

terrablue commented 2 months ago

@ralyodio this hasn't been merged, so it's not solved yet in this tree. However the maintainer is free to add the code to this repo.

In the meanwhile, I've moved on to created a unified solution for bun, deno and node at https://github.com/rcompat/rcompat/issues/25, so I won't be working exclusively on a bun-specific solution anymore.

tr1ckydev commented 2 months ago

Thanks for the contribution but it looks like it isn't a cross platform solution.