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
239 stars 10 forks source link

Tries to load bundled lib file even when `WEBVIEW_PATH` is set. Errors if lib files are excluded from the bundle. #14

Closed citkane closed 1 month ago

citkane commented 2 months ago

I am setting process.env.WEBVIEW_PATH to use a custom build lib file and excluding the default libs from my bundle:

Bun.build({
    ...,
    external: [<the default ../build/libwebview.whatever files>]
})

At runtime however, webview-bun still tries to import the default lib file before opening the given WEBVIEW_PATH. This causes a fatal error.

The fix should be fairly simple, PR #15.

tr1ckydev commented 1 month ago

Fixed in latest commit.