Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/DaniGuardiola/bun-plugin-solid
A plugin to compile Solid.js with Bun.
https://github.com/DaniGuardiola/bun-plugin-solid
bun solidjs
Last synced: about 1 month ago
JSON representation
A plugin to compile Solid.js with Bun.
- Host: GitHub
- URL: https://github.com/DaniGuardiola/bun-plugin-solid
- Owner: DaniGuardiola
- License: mit
- Created: 2023-12-12T13:57:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-12T14:06:15.000Z (about 1 year ago)
- Last Synced: 2024-08-02T07:13:40.781Z (4 months ago)
- Topics: bun, solidjs
- Language: TypeScript
- Homepage:
- Size: 85.9 KB
- Stars: 36
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-solid-js - bun-plugin-solid - A plugin to compile Solid.js with Bun. (🛠️ Tooling / Apps/Websites)
README
# bun-plugin-solid
A plugin to compile Solid.js code with Bun.
```bash
bun add -D bun-plugin-solid
``````tsx
import { SolidPlugin } from "bun-plugin-solid";await Bun.build({
// ...
plugins: [SolidPlugin()],
});
```## Options
All passed options are forwarded to [`babel-preset-solid`](https://www.npmjs.com/package/babel-preset-solid). For example:
```tsx
await Bun.build({
// ...
plugins: [SolidPlugin({ generate: "ssr", hydratable: true })],
});
```## About this plugin and motivation
This plugin uses babel under the hood, which is not ideal. However, there is (currently) no clear public roadmap for proper compilation of Solid.js in Bun, so this plugin is a temporary solution for those (like me) who want to use Bun to build their Solid.js projects.
The hope is that it'll become obsolete once there is a better solution, at which point it can simply be removed.
The plugin will only run in for `.jsx` and `.tsx` files.