rsnext/test/integration/telemetry/next.config.i18n-images
Steven da8d1984d2
Add experimental wildcard remotePatterns config for upstream images (#36245)
## Description 
This PR implements a new configuration object in `next.config.js` called `experimental.images.remotePatterns`.

This will eventually deprecate `images.domains` because it covers the same use cases and more by allowing wildcard pattern matching on `hostname` and `pathname` and also allows restricting `protocol` and `port`.

## Feature

- [x] Implements an existing feature request.
- [x] Related issues linked
- [x] Unit tests added
- [x] Integration tests added
- [x] Documentation added
- [x] Telemetry added. In case of a feature if it's used or not.
- [x] Errors have helpful link attached, see `contributing.md`

## Related 

- Fixes #27925 
- Closes #18429 
- Closes #18632
- Closes #18730
- Closes #27345
2022-05-05 02:19:16 +00:00

28 lines
601 B
Text

module.exports = phase => {
return {
images: {
formats: ['image/avif', 'image/webp'],
imageSizes: [64, 128, 256, 512, 1024],
domains: ['example.com', 'another.com'],
},
experimental: {
images: {
remotePatterns: [{ protocol: 'https', hostname: '**.example.com' }],
},
},
i18n: {
locales: ['en','nl','fr'],
defaultLocale: 'en',
domains: [
{
domain: 'example.com',
defaultLocale: 'en'
},
{
domain: 'example.fr',
defaultLocale: 'fr'
}
]
}
}
}