build: migrate frontend tooling to pnpm + pin vite 8.0.3 (#666)

* build: migrate frontend tooling from yarn to pnpm

The Dockerfiles ran `yarn && yarn build`, which broke on node:24 (yarn no
longer on PATH; the corepack yarn shim made `npm i -g yarn` fail EEXIST),
while CI + Makefile used npm and only a yarn.lock was committed — an
inconsistent yarn/npm split. Standardize on pnpm, pinned via the
packageManager field + corepack.

- package.json: packageManager pnpm@11.6.0.
- pnpm-workspace.yaml: nodeLinker: hoisted (flat node_modules, npm/yarn-like, so
  directly-imported transitive deps like flatpickr resolve) + allow vue-demi's
  postinstall (it selects the Vue 3 entry). pnpm 11 reads these here, not .npmrc.
- Generate pnpm-lock.yaml (imported from yarn.lock); delete yarn.lock.
- Dockerfiles (dev/nginx/production): node:24 + `corepack enable && pnpm install --frozen-lockfile && pnpm build`.
- CI (check.yaml, docker.yaml): pnpm/action-setup + setup-node cache:pnpm; pnpm install --frozen-lockfile / pnpm build.
- Makefile, composer.json dev script, CLAUDE.md: npm/yarn -> pnpm.

pnpm build verified on a clean install (1425 modules, hoisted node_modules).

* fix(build): pin vite to 8.0.3 to fix rolldown chunk regression

vite 8.0.16 (pulled in by #653) bundles rolldown 1.0.3, which emits a
lazy chunk referencing an undefined Vue runtime-init function
(init_runtime_dom_esm_bundler), breaking the SPA at runtime. The build
succeeds so CI never caught it. Pin vite to 8.0.3 (the version 2.3.3
shipped, rolldown 1.0.0) which produces a correct bundle.
This commit is contained in:
Darko Gjorgjijoski
2026-06-12 09:31:08 +02:00
committed by GitHub
parent 107a951126
commit 2f641ace0e
12 changed files with 3274 additions and 2396 deletions

View File

@@ -61,16 +61,20 @@ jobs:
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
- name: Install
run: npm install
run: pnpm install --frozen-lockfile
- name: Compile Front-end
run: npm run build
run: pnpm build
- name: Apply tests ${{ matrix.php-version }}
run: php artisan test
@@ -100,16 +104,20 @@ jobs:
with:
composer-options: --no-dev
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
- name: Install
run: npm install
run: pnpm install --frozen-lockfile
- name: Compile Front-end
run: npm run build
run: pnpm build
- name: Build Dist
run: |