feat: switch to transformWithOxc, drop esbuild direct dependency#76
Open
stevez wants to merge 2 commits into
Open
feat: switch to transformWithOxc, drop esbuild direct dependency#76stevez wants to merge 2 commits into
stevez wants to merge 2 commits into
Conversation
Replace transformWithEsbuild with transformWithOxc for zero-coverage generation. OXC is bundled inside Vite via Rolldown so no extra package is needed. OXC does not constant-fold process.env.NODE_ENV without an explicit define, preserving all branches in the zero-coverage map. Reverts the esbuild direct dependency added in v1.5.1. Bumps version to 1.5.2. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace transformWithEsbuild with transformWithOxc for zero-coverage
generation. Pass jsx:{runtime:'automatic'} to force JSX transformation
regardless of the project's tsconfig.json — Next.js projects typically
set "jsx":"preserve" which OXC respects when auto-discovering tsconfig,
producing far fewer statements without this override.
OXC does not constant-fold process.env.NODE_ENV without an explicit
define, preserving all branches in the zero-coverage map.
Removes the esbuild direct dependency added in v1.5.1.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
transformWithEsbuildwithtransformWithOxcincreateEmptyCoverage(src/converter/index.ts)process.env.NODE_ENVwithout an explicitdefine, so all branches are preserved in the zero-coverage map (same behavior as the formerplatform: 'neutral'esbuild option)esbuilddirect dependency added in v1.5.1, making that release's workaround obsoleteTest plan
🤖 Generated with Claude Code