rsnext/examples/cms-cosmic/next.config.js
Francisco Moretti b4699b860e
'imgix.cosmicjs.com' image domain in cms-cosmic example (#31703)
## Bug-fix: 'imgix.cosmicjs.com' image domain is needed for the cms-cosmic example

- Fixes #31702
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

### Solution 
As suggested by the output I got while running the exapmle, I've added the domain to `next.config.js`
```
event - compiled successfully in 129 ms (552 modules)
error - node_modules\next\dist\client\image.js (660:33) @ defaultLoader
Error: Invalid src prop (https://imgix.cosmicjs.com/8efcc570-9a21-11ea-bf2a-2b6ff88d4f06-e73aee30-1db0-11ea-a594-a170ead8b2cb-12.jpg?auto=format,compress,enhance&w=100&h=100) on `next/image`, hostname "imgix.cosmicjs.com" is not configured under images in your `next.config.js`
See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host
null
```


## Examples

- [ ] Make sure the linting passes by running `yarn lint`
2021-11-22 22:52:44 +00:00

5 lines
75 B
JavaScript

module.exports = {
images: {
domains: ['imgix.cosmicjs.com'],
},
}