|
40 | 40 | non-empty `outputs.appPages` or `outputs.prerenders`). To not have special handling for that in |
41 | 41 | adapters, only non-empty outputs should be `staticFiles` pointing to what's being written to `out` |
42 | 42 | (or custom `distDir`) directory? |
43 | | - |
44 | | -## Plan |
45 | | - |
46 | | -1. There are some operations that are easier to do in a build plugin context due to helpers, so some |
47 | | - handling will remain in build plugin (cache save/restore, moving static assets dirs for |
48 | | - publishing them etc). |
49 | | - |
50 | | -2. We will use adapters API where it's most helpful: |
51 | | - |
52 | | -- adjusting next config: |
53 | | - - [done] set standalone mode instead of using "private" env var (for now at least we will continue |
54 | | - with standalone mode as using outputs other than middleware require bigger changes which will be |
55 | | - explored in later phases) |
56 | | - - [done] set image loader (url generator) to use Netlify Image CDN directly (no need for |
57 | | - \_next/image rewrite then) |
58 | | - - (maybe/explore) set build time cache handler to avoid having to read output of default cache |
59 | | - handler and convert those files into blobs to upload later |
60 | | -- [done] use middleware output to generate middleware edge function |
61 | | -- [done] don't glob for static files and use `outputs.staticFiles` instead |
62 | | -- [checked, did not apply changes yet, due to question about this in feedback section] check |
63 | | - `output: 'export'` case |
64 | | -- note any remaining manual manifest files reading in build plugin once everything that could be |
65 | | - adjusted was handled |
66 | | - |
67 | | -## To figure out |
68 | | - |
69 | | -- Can we export build time otel spans from adapter similarly how we do that now in a build plugin? |
70 | | -- Expose some constants from build plugin to adapter - what's best way to do that? (things like |
71 | | - packagePath, publishDir etc) |
72 | | -- Looking forward - Platform change to accept a list of files to upload to cdn (avoids file system |
73 | | - operations such as `cp`) |
74 | | -- Looking forward - allow using regexes for static headers matcher (needed to apply next.config.js |
75 | | - defined headers to apply to static assets) |
0 commit comments