From 58d050a9c57f67dd96f329d40edcd7b8cc556a68 Mon Sep 17 00:00:00 2001 From: Karan Sharma Date: Tue, 23 Dec 2025 20:43:59 +0530 Subject: [PATCH 01/21] chore(frontend): migrate to Bun + rolldown-vite Replace pnpm with Bun and Vite with rolldown-vite for significantly faster frontend tooling: - Build: ~2.3s (was >55s) - Dev server: ~1s (was ~3s) - Install: ~8s (was ~25s) Changes: - Switch package manager from pnpm to Bun - Replace vite with rolldown-vite for build/dev - Keep standard vite for vitest (SSR compatibility) - Update CI workflow to use Bun - Update Justfile commands --- .github/workflows/frontend-tests.yml | 21 +- Justfile | 10 +- frontend/.npmrc | 4 - frontend/README.md | 70 +- frontend/bun.lock | 1506 +++++++ frontend/package.json | 10 +- frontend/pnpm-lock.yaml | 5384 -------------------------- frontend/pnpm-workspace.yaml | 2 - frontend/vite.config.ts | 9 +- 9 files changed, 1597 insertions(+), 5419 deletions(-) delete mode 100644 frontend/.npmrc create mode 100644 frontend/bun.lock delete mode 100644 frontend/pnpm-lock.yaml delete mode 100644 frontend/pnpm-workspace.yaml diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index 951f9ec38..1954ce931 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -20,31 +20,24 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install pnpm - uses: pnpm/action-setup@v4 + - name: Setup Bun + uses: oven-sh/setup-bun@v2 with: - version: 10 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "23" - cache: "pnpm" - cache-dependency-path: frontend/pnpm-lock.yaml + bun-version: latest - name: Install dependencies working-directory: frontend - run: pnpm install --frozen-lockfile + run: bun install --frozen-lockfile # FIXME: Re-enable TypeScript checks after fixing pending local type errors # - name: Run TypeScript checks # working-directory: frontend - # run: pnpm typecheck + # run: bun run typecheck - name: Run tests working-directory: frontend - run: pnpm test:ci + run: bun run test:ci - name: Build frontend working-directory: frontend - run: pnpm build \ No newline at end of file + run: bun run build \ No newline at end of file diff --git a/Justfile b/Justfile index 88153d443..cdaf5f19c 100644 --- a/Justfile +++ b/Justfile @@ -41,15 +41,15 @@ build-backend: sqlc-generate build-ui: @echo "Building frontend..." cd frontend && \ - [ -d "node_modules" ] || pnpm install --frozen-lockfile --silent && \ - pnpm build + [ -d "node_modules" ] || bun install --frozen-lockfile && \ + bun run build # Build frontend with bundle analysis build-ui-analyze: @echo "Building frontend with bundle analysis..." cd frontend && \ - [ -d "node_modules" ] || pnpm install --frozen-lockfile --silent && \ - pnpm build:analyze + [ -d "node_modules" ] || bun install --frozen-lockfile && \ + bun run build:analyze # Run the server with config run: build @@ -63,7 +63,7 @@ run-backend: build-backend # Run only the frontend server run-frontend: - cd frontend && pnpm dev + cd frontend && bun run dev # Run the documentation server locally run-docs: diff --git a/frontend/.npmrc b/frontend/.npmrc deleted file mode 100644 index 21e4e247e..000000000 --- a/frontend/.npmrc +++ /dev/null @@ -1,4 +0,0 @@ -shamefully-hoist=true -strict-peer-dependencies=false -auto-install-peers=true -node-linker=hoisted \ No newline at end of file diff --git a/frontend/README.md b/frontend/README.md index 33895ab20..f342c9cf7 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,5 +1,69 @@ -# Vue 3 + TypeScript + Vite +# LogChef Frontend -This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `