🍕 Document the nodeGlobals / serverOnlyPackages config landed in #260 - #263
Merged
Merged
Conversation
#260's console output (scanBareNodeGlobals's end-of-build summary) already pointed readers at "CLAY-VITE.md § Node globals in browser bundles" -- that section never actually existed. Adds it: the v5 insert-module-globals history (so "why doesn't Vite just polyfill this" isn't re-litigated), the no-blanket-polyfill policy, the bare-Buffer diagnostic, the nodeGlobals contract and its two modes, the browser-native (btoa) exit path that motivated this in the first place, and serverOnlyPackages as the more general shape of the same leak. Placed directly after "Kiln plugin PostCSS chain" under Section 8, matching that section's own established depth and voice. Docs only -- no .js file touched. npm test (lint + 456 tests) green. Co-Authored-By: Claude Sonnet 5 <[email protected]>
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.
TL;DR — for reviewers short on time
Bufferdiagnostic — that section didn't exist. Adds it, covering whyclay vitecan't auto-polyfill the way Browserify did, thenodeGlobals/serverOnlyPackagesconfig contracts, and the browser-native (btoa) exit path..jsfile touched.npm test(lint + all 456 tests) green — unaffected, as expected for a docs-only change.CLAY-VITE.mdL862–L888 — thenodeGlobalscontract table and config example; the part someone configuring this will actually read.CLAY-VITE.mdL826–L860 — why this needs its own explanation, and the no-blanket-polyfill policy.CLAY-VITE.mdL862–L888 — thenodeGlobalscontract, its two modes, and the browser-native exit path.CLAY-VITE.mdL890–L910 —serverOnlyPackagesas the more general shape of the same leak.Feature Info
Description
Closes a dangling doc reference left by #260 — the diagnostic's own console output pointed at a section that hadn't been written yet.
🤖 Generated with Claude Code