Skip to content

Cookbook

winteru edited this page Nov 21, 2024 · 3 revisions

Reduce the bundle size

Since v0.2.0, we use koffi as FFI package, you may see its node_modules size is up to 80MB but you can simply reduce it into 10MB(uncompressed):

  1. Open node_modules\koffi\build\2.5.0 folder (The version 2.5.0 may change)
  2. Delete folders you won't use

Work with bun

Bun can seamlessly install webview-nodejs, by two commands:

bun add webview-nodejs
bun pm trust libwebview-nodejs

or one command

bun i --trust webview-nodejs

Also, there's a bun binding: webview-bun.

Feel free to edit! Any contribution to Wiki is welcomed!

Clone this wiki locally