Skip to content

Vue

Vue CI on GitHub Actions

Vite rebuilds the dependency pre-bundle on every CI run.

35s → 2s
Pre-bundle
4m → 60s
Test run

Vite rebuilds the dependency pre-bundle on every CI run.

Why it happens

node_modules/.vite holds the optimised dependency bundle and is thrown away.

What to change

  1. Cache node_modules/.vite keyed on the lockfile
  2. Run vitest with --pool=threads to use every core
  3. Build and test in the same job so the pre-bundle is reused

Vue on runnerhut

yaml
jobs:
test:
runs-on: runnerhut-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npx vitest run --pool=threads
- run: npm run build
A working starting point

The only runnerhut-specific line is `runs-on: runnerhut-4vcpu-ubuntu-2404`. Everything else is standard GitHub Actions — the same actions, the same secrets and the same permissions model you use today.

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.