@beekeeperstudio/vite-plugin
v1.0.3
Published
A Vite plugin for Beekeeper Studio plugin development that enables hot reloading
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
npm install --save-dev @beekeeperstudio/vite-plugin
# or
yarn add -D @beekeeperstudio/vite-pluginUsage
- Create a vite project with create-vite
npm create vite@latest
# or
yarn create vite- Install
@beekeeperstudio/vite-plugin
npm install --save-dev @beekeeperstudio/vite-plugin
# or
yarn add -D @beekeeperstudio/vite-plugin- Update vite.config.ts
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 rootoutput(string): Path where the transformed HTML file should be written, relative to the project root
Default:
[{ input: "index.html", output: "dist/index.html" }]export default defineConfig({
plugins: [
bks({
entrypoints: [
{ input: "index.html", output: "dist/index.html" },
{ input: "config.html", output: "dist/config.html" },
]
})
]
});License
MIT
