Overview
This README provides instructions for using a Wails template with Svelte and Vite for asset bundling. It includes installation steps and tips for live development and building the application. The template is designed to work with Wails version 2.0.0-beta.33 and later.
Features
- Wails template using Svelte and Vite for asset bundling
- Live development mode with automatic reloading of frontend source files
- Production mode package building with Wails
- Watcher configuration for monitoring frontend and backend changes simultaneously
Installation
- Double-check the values in wails.json and frontend/package.json.
- Run
npm installfrom within the frontend/ directory to install the JavaScript dependencies. - Run
wails buildfrom the project root directory to build the dist/ directory for the first time. - To run in live development mode, go into the frontend/ directory and run
npm run dev. - In another terminal, run
wails devin the project directory. - Open your browser and navigate to http://localhost:34115 to connect to your application.
- Alternatively, work off of the Wails app that launches via
wails dev. - Changes made to frontend source files should trigger Vite to reload, and changes to any .go files should trigger Wails to recompile and reload.
- To build a redistributable, production mode package, use
wails build.
Summary
This README provides instructions for using a Wails template with Svelte and Vite for asset bundling. It covers installation steps, live development mode, production mode package building, and specific considerations for Windows and Wails version 2.0.0-beta.33 and later. The template allows for seamless frontend and backend development with automatic reloading of relevant files.