rsnext/test/e2e/app-dir/metadata-dynamic-routes/app/(group)
Jiachi Liu a3e56c9c1e
Move ImageResponse to next/og (#56662)
### Story

Since we introduced `ImageResponse` into `next/server` export, there're a few libraries relying on `next/server` that accidentally ended up with bundling og image into the bundle. As og package is quite large that could easily raise the size concern for middleware, edge runtime routes.

### Struggles
 We've done optimizations. The tree-shaking strategies are tricky, we tried modularize imports and also optimize cjs require/exports to make sure you're not including og package into bundle if it's not being used. However, it's still not 100% can handle all the bundle optimization cases, such as `import {..} from "next/server.js"` could also ended up with the cjs bundle that failed the tree-shaking.

### Move on
So we decide to move og `ImageResponse` into a separate export `next/og`

Closes NEXT-1660
2023-10-19 14:26:48 +00:00
..
blog Create unique route path for og under group routes (#47985) 2023-04-05 22:40:17 +00:00
dynamic/[size] Move ImageResponse to next/og (#56662) 2023-10-19 14:26:48 +00:00
static Add suffix to static metadata images (#48202) 2023-04-12 14:30:31 +00:00
layout.tsx Create unique route path for og under group routes (#47985) 2023-04-05 22:40:17 +00:00
opengraph-image.tsx Move ImageResponse to next/og (#56662) 2023-10-19 14:26:48 +00:00
twitter-image.tsx Move ImageResponse to next/og (#56662) 2023-10-19 14:26:48 +00:00