https://github.com/yusukebe/vite-plugin-wrangler-dev
[WIP] Vite with Wrangler
https://github.com/yusukebe/vite-plugin-wrangler-dev
Last synced: about 1 year ago
JSON representation
[WIP] Vite with Wrangler
- Host: GitHub
- URL: https://github.com/yusukebe/vite-plugin-wrangler-dev
- Owner: yusukebe
- Created: 2023-06-29T16:27:14.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-24T14:36:33.000Z (almost 3 years ago)
- Last Synced: 2025-01-08T17:33:00.133Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 44.9 KB
- Stars: 17
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vite-plugin-wrangler-dev
**vite-plugin-wrangler-dev** is a Vite Plugin designed for the development of Cloudflare Workers or Cloudflare Pages.
It allows the "wrangler dev server" to run inside of Vite, makes the use of Workers Bindings possible for Vite-based web frameworks.
## Demo
https://github.com/yusukebe/vite-plugin-wrangler-dev/assets/10682/0389d781-c18d-4af4-ab07-b41948cf252d
## Status
WIP. It's not published yet.
## Usage
```ts
import { defineConfig } from 'vite'
import vitePluginWranglerDev from '../src'
export default defineConfig({
plugins: [
vitePluginWranglerDev({
entry: '/src/_worker.ts',
client: '/src/client.ts',
passThrough: ['/js/client.js']
})
]
})
```
## Options
```ts
type WranglerDevOptions = {
entry?: string
client?: string
assetDirectory?: string
passThrough?: string[]
wranglerDevOptions?: UnstableDevOptions
}
```
## Authors
Yusuke Wada
## License
MIT