I am using the Next dev server locally a lot and `setupDevPlatform ` is definitely helpful there. Bu

I am using the Next dev server locally a lot and setupDevPlatform is definitely helpful there. But sometimes I have to debug an issue due to the subtle differences between runtimes of
next dev
(Vercel Edge) and
wrangler pages dev
(workerd) because the latter is what runs on production. So I'm looking for a faster workflow to do that locally. Is the best option currently to run npx @cloudflare/next-on-pages --watch, and then re-run
wrangler pages dev
on changes to the build assets? I tried the --live-reload functionality of
wrangler pages dev
in this situation but it did not seem to trigger reloads of the browser page. And when I manually reload the page, it still referencing the JS chunk files from the original build in the page index HTML causing loading errors until I manually restart the Wrangler dev server. I haven't tried Nodemon yet to restart the Wrangler dev server on build changes, so that might be an option. I'm curious how other people are tackling this.
Was this page helpful?