https://github.com/beekeeper-studio/vite-plugin
A Vite plugin for Beekeeper Studio plugin development.
https://github.com/beekeeper-studio/vite-plugin
beekeeper-studio hot-reload vite
Last synced: 4 months ago
JSON representation
A Vite plugin for Beekeeper Studio plugin development.
- Host: GitHub
- URL: https://github.com/beekeeper-studio/vite-plugin
- Owner: beekeeper-studio
- License: mit
- Created: 2025-08-18T15:37:32.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-08-20T13:25:34.000Z (5 months ago)
- Last Synced: 2025-09-05T22:45:56.239Z (4 months ago)
- Topics: beekeeper-studio, hot-reload, vite
- Language: TypeScript
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @beekeeperstudio/vite-plugin
A Vite plugin for Beekeeper Studio plugin development.
## What It Does
- Enables **Hot Module Replacement (HMR)** during development
- Transforms HTML for production builds — ensuring correct URLs and paths in bundled plugin files
## Installation
```bash
npm install --save-dev @beekeeperstudio/vite-plugin
# or
yarn add -D @beekeeperstudio/vite-plugin
```
## Usage
1. Create a vite project with [create-vite](https://vite.dev/guide/#scaffolding-your-first-vite-project)
```bash
npm create vite@latest
# or
yarn create vite
```
2. Install `@beekeeperstudio/vite-plugin`
```bash
npm install --save-dev @beekeeperstudio/vite-plugin
# or
yarn add -D @beekeeperstudio/vite-plugin
```
3. Update vite.config.ts
```diff
import { defineConfig } from 'vite';
+ import bks from '@beekeeperstudio/vite-plugin';
export default defineConfig({
+ plugins: [bks()],
});
```
## Options
### `entrypoints` (optional)
An array of objects defining input/output file pairs to transform:
- `input` (string): Path to the source HTML file, relative to the project root
- `output` (string): Path where the transformed HTML file should be written, relative to the project root
**Default:**
```ts
[{ input: "index.html", output: "dist/index.html" }]
```
```ts
export default defineConfig({
plugins: [
bks({
entrypoints: [
{ input: "index.html", output: "dist/index.html" },
{ input: "config.html", output: "dist/config.html" },
]
})
]
});
```
## License
MIT