Skip to content

fix(build): compile the Solid 2 JSX transform, and declare the peers it needs - #243

Merged
pathscale merged 1 commit into
masterfrom
fix/solid-2-transform
Aug 16, 2026
Merged

fix(build): compile the Solid 2 JSX transform, and declare the peers it needs#243
pathscale merged 1 commit into
masterfrom
fix/solid-2-transform

Conversation

@pathscale

Copy link
Copy Markdown
Owner

The consumer smoke test was failing on master after #242 merged, on a package that builds cleanly in-repo. Four faults, each hidden behind the one before it.

1. The Solid 1 JSX transform was still running. @rsbuild/plugin-solid depends on babel-preset-solid: ^1.9.12, a range semver cannot cross to 2.0.0-rc.0, so bun installed a nested Solid 1 preset under the plugin and the plugin's own require.resolve loaded that one no matter what this package hoisted. The Solid 1 transform emits solid-js/web (a subpath Solid 2 dropped) and a use helper Solid 2 does not export. An overrides entry plus moduleName pins the transform to Solid 2 across all 130 generated files.

Same shape as the solid-layouts-oxc nesting fixed last week, and the same lesson: a narrow pin inside a dependency is not overridden by hoisting.

2 and 3. The peer ranges did not admit what the emitted code imports. solid-layouts: ^0.1.3 ships no ./solid-2 export, and solid-js: ^1.9 has no omit/createOwner for @solidjs/web to bind to. A consumer installing the declared peers got a package that could not resolve.

4. The smoke fixture was stale — it imported useTableModel (removed with TanStack) and set jsxImportSource: solid-js, whose jsx-runtime Solid 2 moved to @solidjs/web.

Verified: bun run smoke passes end to end (install, typecheck, bundle), 90/90 contract checks, and the emitted import is @solidjs/web with zero use imports remaining.

🤖 Generated with Claude Code

…it needs

The consumer smoke test was failing on a package that built cleanly here, which
is exactly the gap it exists to close. Four separate faults, each hidden behind
the one before it.

@rsbuild/plugin-solid depends on babel-preset-solid ^1.9.12, a range semver
cannot cross to 2.0.0-rc.0, so bun installed a nested Solid 1 preset under the
plugin and the plugin's own require.resolve loaded that one regardless of what
this package hoisted. The Solid 1 transform emits imports from solid-js/web, a
subpath Solid 2 dropped, and a use helper Solid 2 does not export. An override
plus moduleName pins the transform to the Solid 2 one across all 130 generated
files. Same shape as the solid-layouts-oxc nesting, and the same lesson: an
exact or narrow pin in a dependency is not overridden by hoisting.

The peer ranges then said solid-layouts ^0.1.3 and solid-js ^1.9, neither of
which admits what the emitted code imports: 0.1.x ships no ./solid-2 export,
and 1.9 has no omit or createOwner for @solidjs/web to bind to. A consumer
installing the declared peers got a package that could not resolve.

The smoke fixture also still imported useTableModel, removed with TanStack, and
set jsxImportSource to solid-js, whose jsx-runtime Solid 2 moved to
@solidjs/web.
@pathscale
pathscale force-pushed the fix/solid-2-transform branch from afdb4b8 to 47e9040 Compare August 16, 2026 10:33
@pathscale
pathscale merged commit 890e39a into master Aug 16, 2026
@pathscale
pathscale deleted the fix/solid-2-transform branch August 16, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant