Skip to content

fix: replace esbuild runtime usage with sucrase (pure JS, fully bundl…#32

Merged
DeDuckProject merged 1 commit intomainfrom
fix/replace-esbuild-with-sucrase
Mar 14, 2026
Merged

fix: replace esbuild runtime usage with sucrase (pure JS, fully bundl…#32
DeDuckProject merged 1 commit intomainfrom
fix/replace-esbuild-with-sucrase

Conversation

@DeDuckProject
Copy link
Copy Markdown
Owner

…eable)

esbuild was used at runtime in two places (config loading and demo script transpilation) and was marked --external in the bundle, causing "Cannot find package 'esbuild'" errors when the action runs on GitHub Actions (which doesn't install action node_modules).

sucrase is a pure-JS TypeScript stripper with no native binary deps, so it bundles cleanly into dist/index.js and dist/check.js.

Changes:

  • config/loader.ts: replace esbuild build() with sucrase transform() (writes tmp file next to original so relative imports resolve)
  • playwright-runner.ts: replace esbuild transformSync() with sucrase transform()
  • core/package.json: swap esbuild dep for sucrase
  • action/package.json: remove --external:esbuild from both bundle commands

…eable)

esbuild was used at runtime in two places (config loading and demo script
transpilation) and was marked --external in the bundle, causing
"Cannot find package 'esbuild'" errors when the action runs on GitHub
Actions (which doesn't install action node_modules).

sucrase is a pure-JS TypeScript stripper with no native binary deps,
so it bundles cleanly into dist/index.js and dist/check.js.

Changes:
- config/loader.ts: replace esbuild build() with sucrase transform()
  (writes tmp file next to original so relative imports resolve)
- playwright-runner.ts: replace esbuild transformSync() with sucrase transform()
- core/package.json: swap esbuild dep for sucrase
- action/package.json: remove --external:esbuild from both bundle commands

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DeDuckProject DeDuckProject merged commit 35644f2 into main Mar 14, 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.

1 participant