| 12345678910111213141516171819202122 |
- import reactStack from 'hono-vite-react-stack'
- import { defineConfig } from 'vite'
- import { defaultOptions as buildDefaultOptions } from '@hono/vite-build/cloudflare-workers'
- export default defineConfig({
- build: {
- rollupOptions: {
- external: ['cloudflare:workers']
- }
- },
- plugins: [
- reactStack({
- buildPluginOptions: {
- entryContentAfterHooks: [
- ...buildDefaultOptions.entryContentAfterHooks,
- () => `export { MyDurableObject } from "/src/server/do"`
- ],
- entryContentDefaultExportHook: buildDefaultOptions.entryContentDefaultExportHook
- }
- })
- ]
- })
|