Socket
Book a DemoInstallSign in
Socket

bun-plugin-solid

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bun-plugin-solid

A plugin to compile Solid.js with Bun.

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

bun-plugin-solid

A plugin to compile Solid.js code with Bun.

bun add -D bun-plugin-solid
import { SolidPlugin } from "bun-plugin-solid";

await Bun.build({
  // ...
  plugins: [SolidPlugin()],
});

Options

All passed options are forwarded to babel-preset-solid. For example:

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.

FAQs

Package last updated on 12 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts