@stewie-js/vite
v0.2.0
Published
Vite plugin for the Stewie framework
Downloads
98
Maintainers
Readme
@stewie-js/vite
❗ Work in progress.
Stewie is under active development and not yet stable. APIs may change between releases. Not recommended for production use yet.
Vite plugin for Stewie. Configures the JSX transform to use @stewie-js/core's runtime and wires up HMR.
Part of the Stewie framework.
Install
pnpm add -D @stewie-js/viteUsage
// vite.config.ts
import { stewie, defineConfig } from '@stewie-js/vite'
export default defineConfig({
plugins: [stewie()]
})Or with additional Vite config:
import { stewie, defineConfig } from '@stewie-js/vite'
export default defineConfig({
plugins: [stewie()],
server: {
port: 3000,
},
})What it does
- Sets
jsxImportSource: '@stewie-js/core'so.tsxfiles use Stewie's JSX runtime - Enables HMR for Stewie components in development
API
| Export | Description |
|---|---|
| stewie(options?) | Vite plugin factory |
| defineConfig(config) | Re-exported from Vite — use this instead of importing from vite directly |
| defineStewieConfig(config?) | Like defineConfig but adds the stewie() plugin automatically |
