ADR 0011: @arachnejs/vite — JSX transform plugins
- Status: Accepted
- Date: 2026-09-28
- Deciders: Arachne core
Context #
@arachnejs/jsx wraps @dom-expressions/compiler, but apps need a bundler hook so
.tsx files compile to @arachnejs/render calls. Bun is the primary toolchain;
Vite remains the common app bundler.
Decision #
@arachnejs/viteexports:bunPlugin(options?)— Bun.universal plugin (onLoadfor.[jt]sx)vitePlugin(options?)— Vite-compatible{ name, enforce, transform }object (no hard dependency onvite)
- Both call
compile()from@arachnejs/jsxwithmoduleName: "@arachnejs/render"(DOM) by default;target: "ssr"selects@arachnejs/render/ssr. - Playground / apps pass
bunPlugin()intoBun.build({ plugins }).
Alternatives considered #
- Only document manual
compile()— too awkward for apps. - Put plugins inside
@arachnejs/jsx— keep JSX package compiler-only; bundler adapters live inviteper the layer map.
Consequences #
- Apps write real JSX. Bun must not apply its React JSX transform to those files — the plugin returns already-compiled JS/TS.