Skip to content

fix: add esbuild as direct dependency for Vite 8 compatibility#73

Merged
stevez merged 1 commit into
mainfrom
fix/esbuild-direct-dependency
Jul 11, 2026
Merged

fix: add esbuild as direct dependency for Vite 8 compatibility#73
stevez merged 1 commit into
mainfrom
fix/esbuild-direct-dependency

Conversation

@stevez

@stevez stevez commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Vite 8 no longer bundles esbuild — it became a peer dependency of Vite itself
  • nextcov uses transformWithEsbuild to compile TypeScript/TSX for zero-coverage generation, so esbuild must be present at runtime
  • Adding "esbuild": ">=0.21.0" as a direct dependency ensures it is installed automatically, avoiding a runtime crash for users who don't have esbuild in their project

Changes

  • package.json — add esbuild >= 0.21.0 to dependencies, bump version to 1.5.1
  • package-lock.json — updated to reflect the new direct dependency
  • CHANGELOG.md — add [1.5.1] entry
  • README.md — fix Node.js engine requirement (>= 20>= 22) and add a note explaining that esbuild is now a direct dep

Test plan

  • npm install nextcov in a fresh project (no prior esbuild) — verify esbuild is installed automatically
  • Run E2E coverage collection end-to-end — verify zero-coverage generation still works

🤖 Generated with Claude Code

Vite 8 removed the bundled esbuild and made it a peer dependency.
nextcov uses transformWithEsbuild internally, so esbuild must be
present in the dependency tree. Declaring it explicitly ensures
it is auto-installed without requiring manual user action.

Bumps version to 1.5.1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@stevez
stevez merged commit d998665 into main Jul 11, 2026
6 checks passed
@stevez
stevez deleted the fix/esbuild-direct-dependency branch July 11, 2026 02:58
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.

1 participant