rsnext/docs
Steven b7d057453d
Add images.unoptimized: true for easy next export (#37698)
In a previous PR (#19032), we added a hard error during `next export` if the default Image Optimization API is being used because it requires a server to optimized on demand. The error message offers several different solutions but it didn't consider that by the time someone runs `next export`, they are probably done writing their app.

So if `next export` is a hard requirement, the quickest path forward is to disable Image Optimization API. So this PR adds a new configuration option to `next.config.js`:

```js
module.exports = {
  images: {
    unoptimized: true
  }
}
```

### Update
Upon further discussion, we might want to avoid doing this just for images and instead introduce a top-level config to indicate export is coming and then handle errors or warn for [unsupported features](https://nextjs.org/docs/advanced-features/static-html-export#unsupported-features).

```
module.exports = {
  nextExport: true
}
```

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-16 20:20:17 +00:00
..
advanced-features Update Jest config with SWC docs (#37705) 2022-06-15 11:27:28 +00:00
api-reference Add images.unoptimized: true for easy next export (#37698) 2022-06-16 20:20:17 +00:00
api-routes docs: Add pageExtensions usage note in API Routes (#35918) 2022-05-22 17:46:00 +00:00
basic-features Adds consistency to ESLint rules. (#34335) 2022-06-13 21:17:42 -05:00
guides Few touch-ups to the docs on web forms in Next (#34286) 2022-02-14 20:21:27 +00:00
migrating Add instructions to create pages directory and add an index.js file to it (#35971) 2022-04-15 14:40:37 +02:00
routing Update shallow routing caveat (#35052) 2022-03-07 23:29:07 +00:00
authentication.md Alphabetize auth docs providers. (#34281) 2022-02-13 00:51:53 +00:00
deployment.md Update deployment documentation. (#37571) 2022-06-08 20:46:09 +00:00
faq.md fix: change showcase url (#34590) 2022-02-19 22:33:32 +00:00
getting-started.md Update pnpm create next-app for latest pnpm 6 and 7 (#37254) 2022-05-27 21:21:40 +00:00
going-to-production.md [docs] Update going to production docs around caching headers (#35374) 2022-03-16 22:11:06 +00:00
manifest.json Move CI build cache instructions to Deployment docs (#35418) 2022-05-13 09:56:47 -04:00
testing.md Update testing.md (#29954) 2022-05-23 01:07:20 +00:00
upgrading.md Update upgrading.md (#36091) 2022-04-15 14:43:26 +02:00