build: migrate js builds to esbuild#8722
Conversation
|
What are build size changes in terms of %? |
Adding them - this is only provisional. Gonna try to see if i can squeeze more performance against size gains out before I take the PR out of draft |
|
Build comparison for the latest optimization commit against the previous esbuild migration commit. Compared Measurements are noisy, so this table uses
|
f39ba76 to
82d3659
Compare
|
Additional type generation comparison for the current type-build optimization work. Compared baseline commit Build speed is a clean one-shot
Measured values:
The generated |
4ded5bd to
cffffc8
Compare
cffffc8 to
8b3495a
Compare
2f80a12 to
3bdecfc
Compare
Description
Migrate the engine JavaScript build targets from Rollup to esbuild for faster clean and watch builds.
processing, dynamic import handling, and import validation.
build.mjsleaf commands, and uses Turbo for aggregate build/watch orchestration.
build:treemap,build:treenet, andbuild:treesunto esbuild metafiles viaesbuild-visualizer; dropsbuild:treeflamebecause there is no esbuild-compatible flamegraphtemplate.
Build comparison
Deltas compare current PR head
2f80a12a2againstorigin/main6df566a37in isolated worktrees. Build speed isa clean one-shot target build; watch build speed is the watcher rebuild after a content touch to
src/core/guid.js.JS artifact sizes were measured from target outputs before type generation is mixed into ESM tree totals.
This table uses
~samefor negligible changes: timing deltas under 10%, and size deltas that are byte-identicalor round below 0.1 KiB.
Notes
type,main,module, andexports.typeofshapes, and primitive exported constants match for UMD, bundled ESM,unbundled ESM, and minified outputs. The only ignored primitive is
revision, which is commit-specific.that do not change the public export surface.
fflatenow uses a stablemodules/fflate/...path instead ofRollup's symlink-derived absolute path, and esbuild emits
src/extras/index.js. Neither changes public exports.the main compatibility consideration for ESM consumers.
and
dbgdoes not use the indentation compaction pass. The sourcemap savings are mainly fewernamesentriesand shorter
mappings.esbuild-visualizerforbuild:treemap,build:treenet, andbuild:treesun.build:treeflamewas removed because the esbuild visualizerhas no flamegraph template.
Manual validation
--sourcemapsoutput on both branches and confirmed matching exports.npm run publintandnpm run test:types.build.mjsCLI validation for explicit JS target flags and aggregate watch guidance.treemap,treenet, andtreesunvisualizer scripts, including a watch rebuild smoke test.Checklist