Durable use cache: fix next/image pulling in NEXT_DEPLOYMENT_ID (#98739)
If you do
```js
import Image from "next/image";
export function data(){
"use cache: remote";
return <Image .../>
}
```
then this previously ended up pulling in
`process.env.NEXT_DEPLOYMENT_ID` via
```
app/user-code.js
node_modules/next/image.js
node_modules/next/dist/shared/lib/image-external.js
node_modules/next/dist/shared/lib/get-img-props.js
node_modules/next/dist/shared/lib/deployment-id.js
```
But actually making `image-external.js` a barrel file ensures that we
don't pull in `get-img-props.js` when just importing the `Image` client
component. Then `NEXT_DEPLOYMENT_ID` isn't referenced anymore.
Showing
Please
register
or
sign in
to comment