Skip to content

Commit e2f084b

Browse files
ryansolidclaudecursoragent
committed
fix(size): route solid-js/internal in the size scenarios
esbuild's `alias` matches by PREFIX, so the bare `solid-js` entry remapped `solid-js/internal` to `.../dist/solid.js/internal` and the prod and observe scenarios failed to resolve — the same trap this file already documents for `solid-js/attribution`. Subpath alias listed first in both maps, and added to the frames scenario's `external` (its client entry imports the seam). Frames cap 11.40 -> 11.45 KB, measured at 11.44. Nothing in that bundle changed but one import's specifier: `materializeContainerTrace` used to fold into the single `from "solid-js"` statement and is now its own `from "solid-js/internal"` statement, which brotli cannot share with the first. The other nine scenarios fit unchanged. Co-authored-by: Claude <[email protected]> Co-authored-by: Cursor <[email protected]>
1 parent d240ca9 commit e2f084b

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

‎scripts/size/.size-limit.js‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
// sizes at landing: a breach means tree-shaking regressed (or a deliberate
55
// feature landed — bump the limit in the same PR and say why). The simple-app
66
// scenario is pinned at 10 KB on purpose.
7+
// Subpath aliases first: esbuild's alias matches by prefix, so the bare
8+
// `solid-js` entry would otherwise remap `solid-js/internal` (the seams the
9+
// runtimes consume — packages/solid/src/internal.ts) to `solid.js/internal`.
710
const alias = {
11+
"solid-js/internal": "../../packages/solid/dist/internal.js",
812
"solid-js": "../../packages/solid/dist/solid.js",
913
"@solidjs/web": "../../packages/web/dist/web.js",
1014
"@solidjs/signals": "../../packages/signals/dist/prod/index.js"
@@ -20,6 +24,7 @@ const modifyEsbuildConfig = config => ({ ...config, alias });
2024
// the bare `solid-js` entry would otherwise swallow `solid-js/attribution`.
2125
const observeAlias = {
2226
"solid-js/attribution": "../../packages/solid/dist/attribution.js",
27+
"solid-js/internal": "../../packages/solid/dist/internal.js",
2328
"@solidjs/signals/attribution": "../../packages/signals/dist/observe/attribution.js",
2429
"solid-js": "../../packages/solid/dist/solid.observe.js",
2530
"@solidjs/web": "../../packages/web/dist/web.observe.js",
@@ -43,6 +48,7 @@ const framesEsbuildConfig = config => ({
4348
},
4449
external: [
4550
"solid-js",
51+
"solid-js/internal",
4652
"@solidjs/web",
4753
"@solidjs/web/serialization",
4854
"@solidjs/web/serialization/decode"
@@ -1282,8 +1288,16 @@ module.exports = [
12821288
// and the mirrored qualifier folding above). The per-commit notes were
12831289
// measured on the pre-removal base, so their absolutes no longer line
12841290
// up with this file's floor, but their deltas do.
1291+
//
1292+
// Seams behind `solid-js/internal` (2026-09-15): 11.40 -> 11.45 KB,
1293+
// measured at 11.44. Not retained code — nothing in this bundle changed
1294+
// but one import's SPECIFIER. `materializeContainerTrace` used to fold
1295+
// into the single `from "solid-js"` statement and is now its own
1296+
// `from "solid-js/internal"` statement, which brotli cannot share with
1297+
// the first; the module is external either way. 42 B for taking the view
1298+
// protocol and the server-scope seams off the public `solid-js` surface.
12851299
path: "../../packages/web/frames/dist/client.js",
1286-
limit: "11.40 KB",
1300+
limit: "11.45 KB",
12871301
modifyEsbuildConfig: framesEsbuildConfig
12881302
}
12891303
];

0 commit comments

Comments
 (0)