-app vite application (frontend)
-main.py application entry file
- Enter /app directory
pnpm i
pnpm run dev
- Configure
main.py
if __name__ == '__main__':
api = Api()
window = webview.create_window('pywebview', 'http://localhost:5173', js_api=api, )
webview.start(debug=True)- Launch the main program
Run main.py
- Enter /app directory
pnpm run build
- Configure
main.py
if __name__ == '__main__':
api = Api()
window = webview.create_window('pywebview + vue3', server, js_api=api, )
webview.start(debug=False)- Use
auto-py-to-exefor packaging
pip install auto-py-to-exe
# Launch the tool
auto-py-to-exeSelect the entry point main.py, and add the gui directory generated from the vite build
