Repository navigation
fix(solidjs): preserve JSX source export for Vite SSR - #1590
Conversation
|
@Tiancheng-Xu is attempting to deploy a commit to the Tabler Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
🟢 Approval recommended
The changes are narrowly scoped to extension/export wiring for Solid SSR and are backed by a targeted regression test.
Pull request overview
This PR fixes Vite SSR resolving @tabler/icons-solidjs with incorrect JSX assumptions by ensuring the Solid “source” export points to a JSX-labeled entry, so Vite/Solid tooling can apply the correct transform/runtime.
Changes:
- Switch the Solid package Rollup entry to
.tsxto drive JSX-preserving source emission. - Update the
solidexport condition to point at a.jsxsource entry indist/source. - Add a regression test that asserts the
solidexport uses.jsxand maps back to a.tsxsource entry.
File summaries
| File | Description |
|---|---|
| packages/icons-solidjs/src/tabler-icons-solidjs.tsx | Adds/renames the Solid entrypoint to .tsx for the build pipeline. |
| packages/icons-solidjs/rollup.config.js | Updates Rollup input to the new .tsx entry to influence emitted source extension. |
| packages/icons-solidjs/package.spec.js | Adds a focused test to lock the solid export extension and entry pairing. |
| packages/icons-solidjs/package.json | Changes the solid export condition to reference the .jsx source entry output. |
Review details
- Files reviewed: 3/4 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| import { existsSync } from 'node:fs'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { basename, dirname, extname, resolve } from 'node:path'; | ||
| import { describe, expect, it } from 'vitest'; | ||
| import packageJson from './package.json'; |
|
Addressed the test portability review in commit |
Fixes #1513.
Problem
The
solidexport condition points at source output containing Solid JSX, but the entry is emitted with a.jsextension. Vite can therefore process that source with the wrong JSX assumptions during SSR, leading to areact/jsx-runtimeresolution error.Changes
.tsto.tsx;.jsx;The standard ESM, CJS, browser, and Node export paths are unchanged.
Validation
pnpm test— passed: 3/3 Turbo tasks, 2/2 Vitest files, 7/7 SolidJS tests; includes the SolidJS build and typecheckgit diff --check origin/main...HEAD— passeddist/source/tabler-icons-solidjs.jsx,dist/esm/tabler-icons-solidjs.js, anddist/types/tabler-icons-solidjs.d.tsLimitation
pnpm --filter @tabler/icons-solidjs imports-checkcannot run as written because the repository does not provide theattwexecutable. A one-off@arethetypeswrong/clirun remained non-responsive during analysis and was stopped, so that optional check is not claimed as passed.