Skip to content

About

Support for JSX in SolidJS 1 (use `@solidjs/compiler` for SolidJS 2)

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

solid-jsx-oxc

Warning

For SolidJS 2.0, use @solidjs/compiler instead.

A high-performance JSX compiler for SolidJS built with OXC and Rust.

Features

  • Works on every useful platform (macOS doesn't count but ProgSKID-CC got it working partially, so I added support)
  • Everything else from upstream
  • upstream devs wrote this with ChatGPT (expect bugs if true)

Supported Features

Feature Status
Basic elements & attributes ✅
Dynamic attributes ✅
Event delegation (onClick) ✅
Non-delegated events (on:click) ✅
Capture events (onClickCapture) ✅
prop: prefix ✅
attr: prefix ✅
classList object ⚠️ (complex cases need more coverage)
style object ✅
Refs (variable & callback) ✅
Spread props ✅
Built-in components (For, Show, etc.) ✅
Directives (use:) ✅ (DOM) / ⚠️ (SSR skipped) (I don't care about SSR)
SVG elements ✅
Fragments ✅
SSR mode ✅
@once static marker ❌
Universal mode (generate: "universal") ⚠️ (currently aliases DOM)

Packages

Package Description
solid-jsx-oxc Core OXC-based JSX compiler
vite-plugin-solid-oxc Vite plugin
rolldown-plugin-solid-oxc Rolldown plugin
babel-plugin-jsx-dom-expressions Original Babel plugin (for reference)
dom-expressions Runtime library

Examples

Just use an example as you would, but replacing references to the packages from here with the one from the @wq2 group.

Development

Prerequisites

  • Rust (latest stable)
  • Bun (or Node.js 18+)

Building

# Install dependencies
bun install

# Build the native module
cd packages/solid-jsx-oxc
bun run build

# Run tests
bun run test

Testing

# Run Rust tests
cd packages/solid-jsx-oxc
cargo test

# Run all tests
bun run test

Publishing

The repository includes an interactive publish script that uses Bun's Terminal API for real-time output:

# Dry run (default)
bun publish-alpha.ts

# Publish with interactive confirmation
bun publish-alpha.ts --publish

# Publish automatically (no confirmation)
bun publish-alpha.ts --publish --yes

# With 2FA
bun publish-alpha.ts --publish --yes --otp 123456

# Exclude packages
bun publish-alpha.ts --exclude babel-plugin-jsx-dom-expressions --exclude dom-expressions

# Custom tag
bun publish-alpha.ts --tag beta --publish --yes

# Options
#   --tag <name>              Dist-tag (default: alpha)
#   --only <pkg>              Only publish package and deps (repeatable)
#   --exclude <pkg>           Exclude packages (repeatable)
#   --publish                 Actually publish (default: dry-run)
#   --yes                     Skip confirmation
#   --tolerate-republish      Allow republishing same version
#   --allow-dirty             Allow uncommitted changes
#   --otp <code>              2FA code
#   --list                    Show publish order and exit

The script generates an interactive HTML report with clickable npm package links at the end.

License

MIT

Related Projects

  • SolidJS - A declarative JavaScript library for building user interfaces
  • OXC - The JavaScript Oxidation Compiler
  • dom-expressions - Original DOM Expressions runtime

About

Support for JSX in SolidJS 1 (use `@solidjs/compiler` for SolidJS 2)

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages