Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soundtrackyourbrand/next-on-pages-i18n-issue
https://github.com/soundtrackyourbrand/next-on-pages-i18n-issue
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/soundtrackyourbrand/next-on-pages-i18n-issue
- Owner: soundtrackyourbrand
- Created: 2023-10-05T10:16:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-05T13:32:33.000Z (over 1 year ago)
- Last Synced: 2023-10-05T15:39:35.126Z (over 1 year ago)
- Language: TypeScript
- Size: 77.1 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is minimal [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) to expose a potential bug.
## Expected behavior
Run the Next.js development server:
```shell
npm run dev
# or
yarn dev
# or
pnpm dev
```Open with your browser to see the result.
Note that these pages work:
* [`/`](http://localhost:3000/) – English translation (default)
* [`/sv/`](http://localhost:3000/sv/) – Swedish translation
* [`/next.svg`](http://localhost:3000/next.svg) – file from the public directory used on the pages above
* [`/robots.txt`](http://localhost:3000/robots.txt) – another file from the public directory## Actual behavior
Build the app using next-on-pages:
```shell
npx @cloudflare/next-on-pages
```Run it like on Cloudflare Pages:
```shell
npx wrangler pages dev .vercel/output/static --compatibility-flag=nodejs_compat --port=3001
```Note that these pages work:
* [`/`](http://localhost:3001/) – English translation (default)
* [`/sv/`](http://localhost:3001/sv/) – Swedish translationBut these assets from the public folder do not:
* [`/next.svg`](http://localhost:3001/next.svg) – file from the public directory used on the pages above
* [`/robots.txt`](http://localhost:3001/robots.txt) – another file from the public directoryThe assets are, however, available on `/sv/robots.txt` and `/sv/next.svg`…