JSX compiler for What Framework. Transforms JSX into optimized DOM operations via a Babel plugin or Vite plugin. Current stable version is 0.8.1. Development is active with frequent releases. Key differentiators: file-based routing via virtual module, production optimizations, and significant performance improvements (e.g., DOM rendering pipeline optimizations). Compared to other JSX compilers like babel-plugin-transform-react-jsx, it is tightly integrated with What Framework and provides virtual routing.
npm install what-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures Vite plugin with file-based routing, then mounts app with routes.
Ensure custom rendering extensions are updated to work with the new pipeline.
Use 'what-compiler/file-router' for file router helpers.
Use import syntax; if using CommonJS, use dynamic import() or set package type to module.
Only import routes inside Vite-processed code; do not import in Node scripts outside Vite.
Ensure the import is only used in code processed by Vite (e.g., inside src/).
Run 'npm install what-compiler --save-dev' and verify the import path 'what-compiler/vite' (not 'what-compiler/vite-plugin').
Use import { what } from 'what-compiler/vite'.Use import { babelPlugin } from 'what-compiler/babel'.Convert to ES module or use dynamic import().