The plugin works by
- creating a tmp directory to write transformed js files to so that they could be improted with `file://` urls
- copying and patching vite's dev client file to fit gjs rather than the browser
- polyfilling WebSocket and fetch APIs in gjs

Now, vite has a new Environment API that's making things a bit easier and there's also #gjsify to provide the polyfills I need.

I'm still hitting some issues with the vite moduel runner and ESM evaluator tho

https://vite.dev/guide/api-environment-runtimes

Environment API for Runtimes

Next Generation Frontend Tooling

vitejs

TIL about a new attempt to let GNOME JavaScript run code that uses Node.js API, including node:sqlite - #gjsify by @jumplink: https://gjsify.github.io/gjsify/

Sadly, there's lots of Claude in commits, the focus is on TypeScript, and there's a build step required to run applications, which all for me are anti-features. Still, it'll be interesting to start checking if my code runs on it.

GJSify

The full JavaScript ecosystem, native on Linux

GJSify