Closed tseijp closed 8 months ago
Latest commit: bfcb35faea591fd1f4c67a3d125704c6b87f90df
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
@tseijp
Thank you! Merge this now.
The change is minimal, adding
.mf
toignoreWatching
invite-plugins/packages/dev-server/src/dev-server.ts
.I've been developing with hono-x and cloudflare d1, but frequently encountered vite errors, causing the server to stop many time.
Even without file changes, the vite server kept reloading. Adding
.mf
toserver.watch.ignore
resolved the errors, suggesting.mf
updates caused clashes.For reference, I'm using the following `vite.config.ts`. Developing with *react* and *tailwind* on *hono-x* has been very comfortable and enjoyable. Thank you!
```ts import pages from '@hono/vite-cloudflare-pages' import honox from 'honox/vite' import { defineConfig } from 'vite' import { getPlatformProxy } from 'wrangler' export default defineConfig(async ({ mode }) => { if (mode === 'client') { return { build: { rollupOptions: { input: ['./app/client.ts', './app/style.css'], output: { entryFileNames: 'static/client.js', chunkFileNames: 'static/assets/[name]-[hash].js', assetFileNames: 'static/assets/[name].[ext]', }, }, }, } } else { const { env, dispose } = await getPlatformProxy() return { server: { watch: { ignored: [/\.wrangler/, /\.mf/], }, }, ssr: { external: ['react', 'react-dom'], }, plugins: [ honox({ devServer: { env, plugins: [ { onServerClose: dispose, }, ], }, }), pages(), ], } } }) ``` I've been using cloudflare pages for a long time and am truly grateful. Typically using AWS or GCP for the backend, discovering hono led me to cloudflare's d1. Given my limited experience with cloudflare d1, I would appreciate it if you could close my PR if it's off the mark. Thank you!