Phase 0 foundation — esbuild renderer bundler (#15) - #21
Merged
Conversation
Adds scripts/build-renderer.js (esbuild) and wires it into npm build, so the renderer can be split into ES modules while still loading as one renderer.js. No code moved yet — the renderer stays a single script, so this build is behavior-preserving (tsc clean, build green, 340 tests pass). esbuild added as an explicit devDependency. This is the gating step for #15: the actual module conversion is its own PR (see the issue note — flipping the renderer to a module surfaces ~37 latent type issues that must be cleaned deliberately). Part of #14. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
First step of the v2 refactor (epic #14, phase #15) on branch
refactor/v2-architecture.What: adds an esbuild bundler for the renderer (
scripts/build-renderer.js, wired intonpm build) so the 7000-linerenderer.tscan be split into ES modules while still shipping as onerenderer.js.Behavior-preserving: no code moved — the renderer stays a single script, esbuild just bundles+wraps it. tsc clean, build green, 340 tests pass. Output:
dist/renderer/renderer.js(553 KB) + sourcemap.Why separate from the actual module split: flipping the renderer to a module surfaces ~37 latent type issues (unused-locals + inline interfaces that currently merge with ambient ones). Documented on #15; the conversion is its own PR, to be done with the app runnable for smoke-testing.
mainis untouched.Part of #14.
🤖 Generated with Claude Code