Skip to content

fix(solidjs): preserve JSX source export for Vite SSR - #1590

Merged
codecalm merged 2 commits into
tabler:mainfrom
Tiancheng-Xu:tc/tabler-solidjs-ssr-export-21139a48
Sep 18, 2026
Merged

codecalm merged 2 commits into
tabler:mainfrom
Tiancheng-Xu:tc/tabler-solidjs-ssr-export-21139a48

Conversation

@Tiancheng-Xu

Copy link
Copy Markdown
Contributor

Fixes #1513.

Problem

The solid export condition points at source output containing Solid JSX, but the entry is emitted with a .js extension. Vite can therefore process that source with the wrong JSX assumptions during SSR, leading to a react/jsx-runtime resolution error.

Changes

  • rename the Solid source entry from .ts to .tsx;
  • emit and export the source-condition entry as .jsx;
  • add a focused regression test that locks the export/source extension pairing.

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 typecheck
  • git diff --check origin/main...HEAD — passed
  • packed tarball contains dist/source/tabler-icons-solidjs.jsx, dist/esm/tabler-icons-solidjs.js, and dist/types/tabler-icons-solidjs.d.ts

Limitation

pnpm --filter @tabler/icons-solidjs imports-check cannot run as written because the repository does not provide the attw executable. A one-off @arethetypeswrong/cli run remained non-responsive during analysis and was stopped, so that optional check is not claimed as passed.

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

@Tiancheng-Xu is attempting to deploy a commit to the Tabler Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 .tsx to drive JSX-preserving source emission.
  • Update the solid export condition to point at a .jsx source entry in dist/source.
  • Add a regression test that asserts the solid export uses .jsx and maps back to a .tsx source 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.

Comment thread packages/icons-solidjs/package.spec.js Outdated
Comment on lines +1 to +5
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';
@Tiancheng-Xu

Copy link
Copy Markdown
Contributor Author

Addressed the test portability review in commit 014372e: the package metadata is now read with fs and parsed explicitly, with a file-URL fallback for native Node and a cwd fallback for transformed runners. This avoids relying on Vitest/Vite JSON module transforms. Targeted package.spec.js passes, Prettier and diff checks pass. The full package test still requires generated icon sources that are not present in this shallow PR checkout.

@codecalm
codecalm merged commit 66742da into tabler:main Sep 18, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upgrading @tabler/icons-solidjs from 3.40.0 to 3.41.0 results in react/jsx-runtime error in vite

3 participants