Skip to content

Commit 98c8e76

Browse files
committed
add links to repro for i18n problems
1 parent 2341079 commit 98c8e76

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

adapters-notes.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
## Feedback
22

33
- Files from `public` directory not listed in `outputs.staticFiles`. Should they be?
4-
- `routes.headers` does not contain immutable cache-control headers for `_next/static`
4+
- `routes.headers` does not contain immutable cache-control headers for `_next/static`. Should those
5+
be included?
56
- In `onBuildComplete` - `config.images.remotePatterns` type is `(RemotePattern | URL)[]` but in
67
reality `URL` inputs are converted to `RemotePattern` so type should be just `RemotePattern[]` in
78
`onBuildComplete` (this would require different config type for `modifyConfig` (allow inputs
@@ -14,11 +15,10 @@
1415
or `wasm` (tho wasm files are included in assets, so I think I have a way to support those as-is,
1516
but need to to make some assumption about using extension-less file name of wasm file as
1617
identifier)
17-
- `outputs.staticFiles` (i18n enabled) custom fully static (no `getStaticProps`) `/pages/404.js`
18-
`filePath` point to not existing file (it doesn't have i18n locale prefix in `staticFiles` array,
19-
actual 404.html are written to i18n locale prefixed directories)
20-
- `outputs.staticFiles` (i18n enabled) custom `/pages/404.js` with `getStaticProps` result in fatal
21-
`Error: Invariant: failed to find source route /en/404 for prerender /en/404` directly from
18+
- `outputs.staticFiles` (i18n enabled) custom fully static (no `getStaticProps`) `/pages/*`
19+
`filePath` point to not existing file - see repro at https://github.com/pieh/i18n-adapters
20+
- `outputs.staticFiles` (i18n enabled) custom `/pages/*` with `getStaticProps` result in fatal
21+
`Error: Invariant: failed to find source route /en(/*) for prerender /en(/*)` directly from
2222
Next.js:
2323

2424
```
@@ -31,7 +31,10 @@
3131
(additionally - invariant is reported as failing to run `onBuildComplete` from adapter, but it
3232
happens before adapter's `onBuildComplete` runs, would be good to clear this up a bit so users
3333
could report issues in correct place in such cases. Not that important for nearest future / not
34-
blocking)
34+
blocking).
35+
36+
See repro at https://github.com/pieh/i18n-adapters (it's same as for point above, need to
37+
uncomment `getStaticProps` in one of the pages in repro to see this case)
3538

3639
- `output: 'export'` case seems to produce outputs as if it was not export mode (for example having
3740
non-empty `outputs.appPages` or `outputs.prerenders`). To not have special handling for that in

0 commit comments

Comments
 (0)