rsnext/test/e2e/app-dir/metadata-edge
Shu Ding 8aa9a52c36
Fix tree shaking for image generation module (#51950)
### Issue

When the og module is a shared module being imported in both page and metadata image routes, it will be shared in the module graph. Especially in the edge runtime, since the `default` export is being used in the metadata image routes, then it can't be easily tree-shaked out.

### Solution

Separate the image route to a separate layer which won't share modules with the page, so that image route is always bundling separately and the `@vercel/og` module only stays inside in that layer, when import image metadata named exports (size / alt / etc..) it can be still tree shaked.

Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2023-07-04 18:19:08 +00:00
..
app Fix tree shaking for image generation module (#51950) 2023-07-04 18:19:08 +00:00
index.test.ts Fix tree shaking for image generation module (#51950) 2023-07-04 18:19:08 +00:00
next.config.js Fix tree-shaking for metadata image functions on the Edge runtime (#51762) 2023-06-26 13:44:29 +02:00