rsnext/errors/api-routes-static-export.md
Luis Fernando Alvarez D 36aabe05a2 Show warning if next export detects an API route (#8257)
* Throw error if next export detects an api route

* Moved the test to the export tests

* Added missing comma

* Move the API route comment

* Add comma after replace

* Show a warning instead
2019-08-12 00:37:20 +02:00

375 B

API routes in Static export

Why This Warning Occurred

An exportPathMap path was matched to an API route. next export will not prerender API routes to HTML.

Possible Ways to Fix It

Remove any paths using API routes from your exportPathMap in next.config.js.