Skip to content

Commit 6f3acea

Browse files
committed
docs: updates README
1 parent afabf9e commit 6f3acea

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
MIT Licensed
88

99
> 🧩 A Bun plugin for transforming SolidJS JSX/TSX files at runtime or build time using Babel. Supports SSR and DOM output.
10+
>
11+
> 🟢 Works seamlessly with [Bun](https://bun.sh) and [Elysia](https://elysiajs.com) servers for both runtime and build-time JSX/TSX transformation.
1012
1113
> ⚠️ **Note**: This plugin is designed specifically for use with the [Bun runtime](https://bun.sh). It will not work in Node.js, Deno, or other JavaScript environments.
1214
@@ -21,9 +23,6 @@ MIT Licensed
2123
## Installation
2224

2325
```bash
24-
npm add -d @dschz/bun-plugin-solid @babel/core @babel/preset-typescript babel-preset-solid
25-
pnpm add -d @dschz/bun-plugin-solid @babel/core @babel/preset-typescript babel-preset-solid
26-
yarn add -d @dschz/bun-plugin-solid @babel/core @babel/preset-typescript babel-preset-solid
2726
bun add -d @dschz/bun-plugin-solid @babel/core @babel/preset-typescript babel-preset-solid
2827
```
2928

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
"types": "./dist/index.d.ts"
6868
}
6969
},
70+
"engines": {
71+
"bun": ">=1.2.0"
72+
},
7073
"browser": {},
7174
"typesVersions": {}
7275
}

src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { PluginItem } from "@babel/core";
22
import tsPreset from "@babel/preset-typescript";
33
import solidPreset, { type BabelPresetSolidOptions } from "babel-preset-solid";
4-
import type { BunPlugin } from "bun";
54

65
type SolidPluginOptions = {
76
/**
@@ -35,7 +34,7 @@ type SolidPluginOptions = {
3534
const logPrefix = "\x1b[36m[bun-plugin-solid-jsx]\x1b[0m";
3635
const warnPrefix = "\x1b[33m[bun-plugin-solid-jsx]\x1b[0m";
3736

38-
export const SolidPlugin = (options: Partial<SolidPluginOptions> = {}): BunPlugin => {
37+
export const SolidPlugin = (options: Partial<SolidPluginOptions> = {}): Bun.BunPlugin => {
3938
const { generate = "dom", hydratable = true, sourceMaps = "inline", debug = false } = options;
4039

4140
const debugLog = (msg: string) => {
@@ -88,7 +87,7 @@ export const SolidPlugin = (options: Partial<SolidPluginOptions> = {}): BunPlugi
8887
};
8988
});
9089
},
91-
} satisfies BunPlugin;
90+
} satisfies Bun.BunPlugin;
9291

9392
return Object.freeze(plugin);
9493
};

0 commit comments

Comments
 (0)