This is minimal Next.js project bootstrapped with create-next-app
to expose a potential bug.
Run the Next.js development server:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
Note that these pages work:
/
– English translation (default)/sv/
– Swedish translation/next.svg
– file from the public directory used on the pages above/robots.txt
– another file from the public directory
Build the app using next-on-pages:
npx @cloudflare/next-on-pages
Run it like on Cloudflare Pages:
npx wrangler pages dev .vercel/output/static --compatibility-flag=nodejs_compat --port=3001
Note that these pages work:
But these assets from the public folder do not:
/next.svg
– file from the public directory used on the pages above/robots.txt
– another file from the public directory
The assets are, however, available on /sv/robots.txt
and /sv/next.svg
…