Skip to content

Repository files navigation

oxc-solid-js

Native JSX compiler for Solid.js users built with the OXC toolchain.

Very work in progress, but I encourage you to try it out and report issues!

Install

# compiler
npm install @oxc-solid-js/compiler
# vite plugin
npm install -D @oxc-solid-js/vite
# rolldown plugin
npm install -D @oxc-solid-js/rolldown

Usage

Vite

// vite.config.jsimport{defineConfig}from"vite";importsolidOxcfrom"@oxc-solid-js/vite";exportdefaultdefineConfig({plugins: [solidOxc()],});

Options:

solidOxc({generate: "dom",// "dom" | "ssr" | "universal"hydratable: false,hot: true,// HMR via solid-refresh (dev only)});

Rolldown

// rolldown.config.jsimportsolidOxcfrom"@oxc-solid-js/rolldown";exportdefault{plugins: [solidOxc()],};

Direct API

import{transformJsx}from"@oxc-solid-js/compiler";const{ code, map }=transformJsx(`<div class="hello">world</div>`,{generate: "dom",moduleName: "solid-js/web",sourceMap: true,});

License

This project is licensed under the MIT License.

This project also contains code derived or copied from the following projects:

Licenses of these projects are listed in THIRD-PARTY-LICENSES.

About

Native JSX compiler for Solid.js

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages