chore(gui-client): make better use of vite as a bundler (#9148)

We already use `vite` as a bundling tool but only to rollup some of the
pre-built files. This setup (and therefore our buildscripts) can be
massively simplified by instructing `vite` to also build our TypeScript
code and compile tailwind.

This makes it much easier to develop locally because one only needs to
run `pnpm vite build --watch` to keep everything up to date.
This commit is contained in:
Thomas Eizinger
2025-05-15 14:06:03 +10:00
committed by GitHub
parent 7703063830
commit d16ffe5f0f
15 changed files with 342 additions and 56 deletions

View File

@@ -142,15 +142,8 @@ jobs:
timeout-minutes: 10
with:
runtime: true
# These steps must be synchronized with build.sh and build.bat in `rust/gui-client`
- name: pnpm install
run: |
pnpm install
cp "node_modules/flowbite/dist/flowbite.min.js" "src/"
- name: Compile Tailwind
run: pnpm tailwindcss -i src/input.css -o src/output.css
- name: Run Vite bundler
run: pnpm vite build
- run: pnpm install
- run: pnpm vite build
- name: Build client
run: cargo build -p firezone-gui-client --all-targets
- uses: taiki-e/install-action@33734a118689b0b418824fb78ea2bf18e970b43b # v2.50.4