webui-dev / deno-webui

Use any web browser as GUI, with Deno in the backend and HTML5 in the frontend.
https://webui.me/
MIT License
250 stars 16 forks source link

Example of combining deno-webui with vite or other frontend bundler? #58

Open vancan1ty opened 2 months ago

vancan1ty commented 2 months ago

Has anyone integrated deno-webui with a frontend bundler in order to be able to use a frontend framework like react or vue, as the frontend framework for a webui-deno based application? If so, could an example be linked to from this repository? In my case, I am interested in vite+vue, but I think any frontend bundling example could be helpful for me or others who would like to use a frontend framework in a deno-webui application.

I was able to integrate vue using a simple script-tag based approach but this does not provide TS or single-file-components support as the project grows. Thanks in advance for any pointers.

I was able to find examples like this one: https://github.com/anatoo/vite-deno-plugin/tree/main/examples/react of integrating vite with deno in general, but it's unclear to me how this could be combined with webui.

AlbertShown commented 2 months ago

I believe someone used SvelteKit with Deno. https://github.com/webui-dev/webui/issues/347

AlbertShown commented 2 months ago

The current issue with deno-webui is it's outdated. the core library of webui is 2.5, but deno wrapper still use old 2.4.

vancan1ty commented 2 months ago

Thanks for your comment @AlbertShown . I looked over that snippet -- ty. Without the full example, to me it's still a little unclear on the exact mechanism/integration with sveltekit that is being used. But the full code showing how it's working e2e, including during development, would definitely be along the lines of what I am looking for.

zongwei007 commented 2 months ago

@vancan1ty This is my React SPA example. https://github.com/zongwei007/deno-webui-react-demo

I compile the pages into a static site using Lume and then launch it using WebUI.