What versions & operating system are you using?
System:
OS: Linux 6.18 CachyOS Linux
CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor
Memory: 19.11 GB / 31.25 GB
Container: Yes
Shell: 4.4.0 - /bin/fish
Binaries:
Node: 24.13.0 - /home/magne/.local/share/mise/installs/node/24.13.0/bin/node
Yarn: 1.22.22 - /home/magne/.local/share/mise/installs/node/24.13.0/bin/yarn
npm: 11.6.2 - /home/magne/.local/share/mise/installs/node/24.13.0/bin/npm
pnpm: 10.28.0 - /home/magne/.local/share/mise/installs/node/24.13.0/bin/pnpm
bun: 1.3.5 - /usr/bin/bun
Deno: 2.6.5 - /usr/bin/deno
npmPackages:
@cloudflare/vite-plugin: ^1.24.0 => 1.24.0
wrangler: ^4.64.0 => 4.64.0
Please provide a link to a minimal reproduction
https://developers.cloudflare.com/workers/vite-plugin/get-started/
Describe the Bug
Starting with a fresh project, after starting the dev server (pnpm run dev), if I update vite.config.ts by adding a blank line, I then get an error, and the dev server is unresponsive.
It sometimes does work though, like 5% of the time.
Please provide any relevant error logs
16:20:21 [vite] Unexpected token 'E', "Error: Par"... is not valid JSON
16:20:21 [vite] server restart failed
Port 5173 is in use, trying another one...
16:20:21 [vite] server restarted.
➜ Local: http://localhost:5174/
➜ Network: use --host to expose
➜ Debug: http://localhost:5174/__debug
16:20:29 [vite] Internal server error: Expected `miniflare` to be defined
at get miniflare (file:///home/magne/workspace/repro/cf/node_modules/.pnpm/@cloudflare+vite-plugin@1.24.0_vite@7.3.1_workerd@1.20260210.0_wrangler@4.64.0/node_modules/@cloudflare/vite-plugin/dist/index.mjs:1734:3)
at file:///home/magne/workspace/repro/cf/node_modules/.pnpm/@cloudflare+vite-plugin@1.24.0_vite@7.3.1_workerd@1.20260210.0_wrangler@4.64.0/node_modules/@cloudflare/vite-plugin/dist/index.mjs:26345:18
at file:///home/magne/workspace/repro/cf/node_modules/.pnpm/@cloudflare+vite-plugin@1.24.0_vite@7.3.1_workerd@1.20260210.0_wrangler@4.64.0/node_modules/@cloudflare/vite-plugin/dist/index.mjs:1593:25
at call (file:///home/magne/workspace/repro/cf/node_modules/.pnpm/vite@7.3.1/node_modules/vite/dist/node/chunks/config.js:10605:5)
at next (file:///home/magne/workspace/repro/cf/node_modules/.pnpm/vite@7.3.1/node_modules/vite/dist/node/chunks/config.js:10558:4)
at viteServeStaticMiddleware (file:///home/magne/workspace/repro/cf/node_modules/.pnpm/vite@7.3.1/node_modules/vite/dist/node/chunks/config.js:22431:143)
at call (file:///home/magne/workspace/repro/cf/node_modules/.pnpm/vite@7.3.1/node_modules/vite/dist/node/chunks/config.js:10605:5)
at next (file:///home/magne/workspace/repro/cf/node_modules/.pnpm/vite@7.3.1/node_modules/vite/dist/node/chunks/config.js:10558:4)
at viteServeRawFsMiddleware (file:///home/magne/workspace/repro/cf/node_modules/.pnpm/vite@7.3.1/node_modules/vite/dist/node/chunks/config.js:22484:10)
at call (file:///home/magne/workspace/repro/cf/node_modules/.pnpm/vite@7.3.1/node_modules/vite/dist/node/chunks/config.js:10605:5)
What versions & operating system are you using?
Please provide a link to a minimal reproduction
https://developers.cloudflare.com/workers/vite-plugin/get-started/
Describe the Bug
Starting with a fresh project, after starting the dev server (
pnpm run dev), if I updatevite.config.tsby adding a blank line, I then get an error, and the dev server is unresponsive.It sometimes does work though, like 5% of the time.
Please provide any relevant error logs