Wails Vite Svelte Template screenshot

Wails Vite Svelte Template

Author Avatar Theme by Billbuilt
Updated: 10 Feb 2024
7 Stars

A Wails template using Svelte and Vite

Categories

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

  1. Double-check the values in wails.json and frontend/package.json.
  2. Run npm install from within the frontend/ directory to install the JavaScript dependencies.
  3. Run wails build from the project root directory to build the dist/ directory for the first time.
  4. To run in live development mode, go into the frontend/ directory and run npm run dev.
  5. In another terminal, run wails dev in the project directory.
  6. Open your browser and navigate to http://localhost:34115 to connect to your application.
  7. Alternatively, work off of the Wails app that launches via wails dev.
  8. Changes made to frontend source files should trigger Vite to reload, and changes to any .go files should trigger Wails to recompile and reload.
  9. 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.