You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@void/react: a non-island component under an _-prefixed directory in pages/ ships every page module to the browser #575
pages/_ui/frame.tsx, a shared server-only component that is not a page or an island:
exportconstSECRET_COPY='server-only text';exportfunctionFrame({ children }: {children: React.ReactNode}){return<maindata-x={SECRET_COPY}>{children}</main>;}
vp build, then ls dist/client/assets and grep -l 'server-only text' dist/client/assets/*.js.
Expected: an island-only app emits no pages-client bundle, and frame.tsx (not a route, because the route scanner skips _ segments) never reaches dist/client.
Actual:pages-client-*.js plus a chunk for every page module and every import (frame-*.js) are emitted to dist/client/assets, and the server-only strings are in them. In our app that is 18 files and 351 KB instead of 5 files and 33 KB, and 42 strings that were meant to stay server-side.
Cause:packages/react/src/plugin-pages.tshasNonIslandPages() skips only basenames that start with _:
entry.name for pages/_ui/frame.tsx is frame.tsx. The pages scanner (scan.ts) skips any segment that starts with _ (except _layouts), so the two disagree. The Solid plugin has the same check.
Suggested fix: test every path segment relative to dir, as the scanner does:
Activity