Skip to content

Commit 601572a

Browse files
committed
update notes
1 parent f369128 commit 601572a

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

adapters-notes.md

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

3-
- Files from `public` not in `outputs.staticFiles`
3+
- Files from `public` directory not listed in `outputs.staticFiles`
44
- In `onBuildComplete` - `config.images.remotePatterns` type is `(RemotePattern | URL)[]` but in
55
reality `URL` inputs are converted to `RemotePattern` so type should be just `RemotePattern[]`
66
- `routes.headers` does not contain immutable cache-control headers for \_next/static
77
- `outputs.middleware` does not contain env that exist in `middleware-manifest.json` (i.e.
88
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY, **NEXT_PREVIEW_MODE_ID, **NEXT_PREVIEW_MODE_SIGNING_KEY etc)
99
- `outputs.middleware.config.matchers` can be undefined per types - can that ever happen? Can we
1010
just have empty array instead to simplify handling.
11+
- `outputs.staticFiles` (i18n enabled) custom fully static (no `getStaticProps`) `/pages/404.js`
12+
`filePath` point to not existing file (it's not i18n locale prefix in `staticFiles` array, actual
13+
404.html are written to i18n locale prefixed dirs)
14+
- `outputs.staticFiles` (i18n enabled) custom `/pages/404.js` with `getStaticProps` result in fatal
15+
`Error: Invariant: failed to find source route /en/404 for prerender /en/404` directly from
16+
Next.js
1117

1218
## Plan
1319

@@ -18,15 +24,15 @@
1824
2. We will use adapters API where it's most helpful:
1925

2026
- adjusting next config:
21-
- set standalone mode instead of using "private" env var (for now at least we will continue with
22-
standalone mode as using outputs other than middleware require bigger changes which will be
27+
- [done] set standalone mode instead of using "private" env var (for now at least we will continue
28+
with standalone mode as using outputs other than middleware require bigger changes which will be
2329
explored in later phases)
24-
- set image loader (url generator) to use Netlify Image CDN directly (no need for \_next/image
25-
rewrite then)
30+
- [done] set image loader (url generator) to use Netlify Image CDN directly (no need for
31+
\_next/image rewrite then)
2632
- (maybe/explore) set build time cache handler to avoid having to read output of default cache
2733
handler and convert those files into blobs to upload later
28-
- use middleware output to generate middleware edge function
29-
- don't glob for static files and use `outputs.staticFiles` instead
34+
- [partially done - for edge runtime] use middleware output to generate middleware edge function
35+
- [done] don't glob for static files and use `outputs.staticFiles` instead
3036
- don't read various manifest files manually and use provided context in `onBuildComplete` instead
3137

3238
## To figure out
@@ -36,3 +42,5 @@
3642
packagePath, publishDir etc)
3743
- Looking forward - Platform change to accept a list of files to upload to cdn (avoids file system
3844
operations such as `cp`)
45+
- Looking forward - allow using regexes for static headers matcher (needed to apply next.config.js
46+
defined headers to apply to static assets)

0 commit comments

Comments
 (0)