Skip to content

fix(deps): update vite to 2.9 so the config loads on current Node - #52

Merged
TorstenDittmann merged 1 commit into
mainfrom
fix-ci
Nov 4, 2026
Merged

TorstenDittmann merged 1 commit into
mainfrom
fix-ci

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

Cause

package-lock.json pins vite@2.2.1. Vite 2.2 loads vite.config.js by calling require() on it and relies on the ESM export default throwing, so it can fall back to bundling. Node 20.19+ and 22.12+ support require(esm), so the require() succeeds and returns a module namespace object, which Vite 2.2 rejects with config must export or return an object. The build still works on Node 16, but fails on Node 24, which the verify job in #51 uses.

Fix

npm update vite: the lockfile moves to vite@2.9.18, the last 2.x release and still inside the existing ^2.2.1 range, so package.json is unchanged. Vite 2.9 bundles the config with esbuild before loading it. The rest of the lockfile change is Vite's own tree (esbuild 0.14, rollup 2.77, postcss 8.5 within ^8.2.12).

Also adds the shared verify caller (identical to #51) so this PR runs the same check.

Verification

On Node 24.22: npm ci and npm run build succeed and emit the same index.html, CSS and JS bundles as the old lock does on Node 16.

Unblocks #51.

Vite 2.2 loads vite.config.js with require() and expects ESM syntax to throw. Node 20.19+ and 22.12+ load it as a module namespace instead, which Vite rejects with 'config must export or return an object'. Vite 2.9, within the existing ^2.2.1 range, bundles the config first.
@ghost

ghost commented Nov 3, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The lockfile upgrades Vite and its build-tool dependencies while leaving the package manifest unchanged. A reusable GitHub Actions verify workflow is added for pull requests and pushes to main.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 2
File Change
package-lock.json Updates Vite to 2.9.18 and refreshes its locked dependency tree.
.github/workflows/verify.yml Adds the shared verify workflow for pull requests and pushes to main.
🔇 Filtered out · 2

Findings Hansi considered but did not post.

Finding Why
Rollup 2.77.3 is in an audited XSS-vulnerable range Verifier: The advisory's vulnerable gadget is generated for cjs/umd/iife output using import.meta URLs or asset references, not ES-module output. This project's build is plain vite build, and vite.config.js only enables the Vue plugin; Vite 2.9.18 defaults this client build to format: 'es'. There is also no import.meta usage in the application. Thus the vulnerable output path is not reached. Moreover, the previous Rollup 2.45.2 was already in the same affected range; the version bump does not introduce this advisory.
Vite 2.9.18 introduces a Windows dev-server path bypass Verifier: The version range is accurate, but the advisory explicitly requires a Windows dev server exposed to the network with --host/server.host. package.json runs plain vite, the README uses that command without additional flags, and vite.config.js sets no server host. Vite 2.9.18's resolveHostname uses 127.0.0.1 when host is unspecified, so the repository's dev command does not expose the server to the network. The finding assumes a host override not present in the code or documented workflow; the audited version alone does not establish this exploit path.

Reviewed c90e3f5 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

@TorstenDittmann
TorstenDittmann merged commit 4c7d7fe into main Nov 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants