Skip to content

A JSX island ships Solid's DEV bundle — ~20.9 kB against a 4 kB site budget, and no build knob switches it #254

Description

@sebyx07

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:

  1. 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.
  2. Failing that, do the island defaults move — and to what, honestly derived from the smallest real Solid island rather than from the current numbers?
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions