r0x0r / pywebview

Build GUI for your Python program with JavaScript, HTML, and CSS
https://pywebview.flowrl.com
BSD 3-Clause "New" or "Revised" License
4.62k stars 537 forks source link

first class support for bundlers #1301

Open baseplate-admin opened 7 months ago

baseplate-admin commented 7 months ago

Description

It would be awesome if pywebview provided support for first class bundlers (eg: webpack,vite)

Practicalities

r0x0r commented 7 months ago

How would bundler support look like?

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

baseplate-admin commented 6 months ago

Hi sorry for late reply.

How would bundler support look like?

Something like tauri, where we use vite to bundle assets.

Why?

  1. This would allow us to the pre-processed js frameworks like solid.js, svelte, vue
  2. Generally working with bundlers are easier compared to manual management.

Outcome:

  1. One single js file that allows users to access the gui.
r0x0r commented 6 months ago

Tauri has a node application that creates a project scaffold with a configuration file. Is this what you suggest?

baseplate-admin commented 6 months ago

Correct. We use node.js to make a bundle. Final application wont have any node.js dependency

r0x0r commented 6 months ago

While it is a noble idea, but the reality is that I do not have resources for launching and maintaining a separate project.

baseplate-admin commented 6 months ago

While it is a noble idea, but the reality is that I do not have resources for launching and maintaining a separate project.

Fair enough, but could you please keep this issue open? Maybe someone will implement that feature

r0x0r commented 6 months ago

Sure

thecircleisround commented 5 months ago

I've updated the react boilerplate to use vite and vue3 here Vu3 Boilerplate. I have not tested on windows. Should still work with react.