Surfaced while fixing #243 (PR #253).
Bun.build with target: 'browser' always resolves the development export condition, so solid-js/web arrives as its dev build. A trivial JSX island — one createSignal, one <button>, one reactive text child — bundles to ~20.9 kB minified.
Against DEFAULT_ISLAND_JS_BYTES in packages/render/src/registry.ts:
| Surface |
Budget |
A trivial JSX island |
site/ |
4 kB |
~20.9 kB |
app/ |
18 kB |
~20.9 kB |
No knob switches it. Measured, all four:
conditions: ['production']
production: true
env: 'disable'
define: { 'process.env.NODE_ENV': '"production"' }
None produces the production build of solid-js/web.
Nothing is red today — no island in either tracked app uses JSX, which is the same reason #243 survived five majors. But the first JSX island written in examples/dummy or dummy/social-media-clone blows its budget, and byte-measured route budgets are one of the framework's genuinely good checks (they caught the duplicated three import). A budget that a correct, minimal island cannot meet trains people to raise budgets, which is how the check stops meaning anything.
Needs a decision, and probably an upstream issue:
- Is there a Bun mechanism to select the
production condition for target: 'browser' that was missed? If not, this is an oven-sh/bun issue worth filing.
- Failing that, do the island defaults move — and to what, honestly derived from the smallest real Solid island rather than from the current numbers?
- Or does the framework strip/alias
solid-js/web to its production entry itself, at the same seam solid-loader.ts already occupies?
Option 3 is the one that keeps the budget meaningful without inflating it. It should be measured before it is chosen.
Surfaced while fixing #243 (PR #253).
Bun.buildwithtarget: 'browser'always resolves thedevelopmentexport condition, sosolid-js/webarrives as its dev build. A trivial JSX island — onecreateSignal, one<button>, one reactive text child — bundles to ~20.9 kB minified.Against
DEFAULT_ISLAND_JS_BYTESinpackages/render/src/registry.ts:site/app/No knob switches it. Measured, all four:
conditions: ['production']production: trueenv: 'disable'define: { 'process.env.NODE_ENV': '"production"' }None produces the production build of
solid-js/web.Nothing is red today — no island in either tracked app uses JSX, which is the same reason #243 survived five majors. But the first JSX island written in
examples/dummyordummy/social-media-cloneblows its budget, and byte-measured route budgets are one of the framework's genuinely good checks (they caught the duplicatedthreeimport). A budget that a correct, minimal island cannot meet trains people to raise budgets, which is how the check stops meaning anything.Needs a decision, and probably an upstream issue:
productioncondition fortarget: 'browser'that was missed? If not, this is anoven-sh/bunissue worth filing.solid-js/webto its production entry itself, at the same seamsolid-loader.tsalready occupies?Option 3 is the one that keeps the budget meaningful without inflating it. It should be measured before it is chosen.