Repository navigation
Reload global.vars browser defines in watch mode and warn on esbuild.settings changes - #378
Merged
Merged
Conversation
bcomnes
force-pushed
the
feat/watch-warn-stale-esbuild-config
branch
from
December 4, 2026 05:09
aa00b59 to
5031c94
Compare
bcomnes
marked this pull request as ready for review
December 4, 2026 05:10
Owner
Author
|
This one smells. |
bcomnes
force-pushed
the
feat/watch-warn-stale-esbuild-config
branch
2 times, most recently
from
December 4, 2026 17:56
ec7ef4d to
c65e793
Compare
Coverage Report for CI Build 47413834099Coverage at 96.197% (no base build to compare)Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
…on esbuild.settings changes
bcomnes
force-pushed
the
feat/watch-warn-stale-esbuild-config
branch
from
December 4, 2026 19:58
c65e793 to
167bb2b
Compare
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.
Closes #363
Replaces the earlier cross-cutting warning plumbing with a cleaner split:
global.vars.*browserexport (lib/build-esbuild/browser-vars-worker.js,lib/build-esbuild/index.js): In watch mode (modeOpts.watch === true),createBrowserBuildOpts()resolvesglobal.vars.*'sbrowserexport in a short-lived worker thread and serializes each entry withJSON.stringifyinside the worker. Edits, additions, and removals ofexport const browser(and its imports) now reload live during watch rebuilds without polluting the main-thread ESM cache. Single builds remain unchanged with zero worker overhead.esbuild.settings.*(lib/watch/index.js): Logs a clear warning inDomStackWatcher.#handleWatchBatch()whenesbuild.settings.*changes, instructing the user to restart watch for esbuild config changes to take effect (with no changes toWatchEsbuildManager,WatchDependencyIndex, orWatchSnapshot).lib/watch/lifecycle-tests/stale-config-warning.test.js): Verifies live reload ofglobal.vars.jsbrowserdefines intoglobal.client.jsand theesbuild.settings.jsrestart warning.