Real-time transpiler for Electron apps using JSX/React with hot reload. Version 0.0.5 is a beta release that watches a specified directory containing .jsx source files, transpiles them via Babel (converting ES6 imports to require), and outputs to a react-builds folder. It enables file-based development with no server or webpack required. The package is built on top of Babel, chokidar for file watching, and react to allow writing React components in Electron with nodeIntegration. Known limitations include potential bugs with stylesheet imports and beta stability.
npm install electron-jsxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic setup: HTML script tag to configure electron-jsx, Electron main process, and a simple React entry point.
Set webPreferences.nodeIntegration: true when creating BrowserWindow.
Use CSS-in-JS libraries like Material-UI instead of separate .css files.
Pin version and test upgrades thoroughly.
Use <script react-src="./react-app/index.jsx"> instead of regular src.
Check for updated version that uses @babel/core.
Set webPreferences: { nodeIntegration: true } in the BrowserWindow constructor.Run 'npm install electron-jsx' in your project root.
Ensure your React files have .jsx extension and that the reactDir option points to the correct folder.