Buckets:
| --- | |
| title: Custom Routes must return an array | |
| --- | |
| ## Why This Error Occurred | |
| When defining custom routes an array wasn't returned from either `headers`, `rewrites`, or `redirects`. | |
| ## Possible Ways to Fix It | |
| Make sure to return an array that contains the routes. | |
| **Before** | |
| ```js filename="next.config.js" | |
| module.exports = { | |
| async rewrites() { | |
| return { | |
| source: '/feedback', | |
| destination: '/feedback/general', | |
| } | |
| }, | |
| } | |
| ``` | |
| **After** | |
| ```js filename="next.config.js" | |
| module.exports = { | |
| async rewrites() { | |
| return [ | |
| { | |
| source: '/feedback', | |
| destination: '/feedback/general', | |
| }, | |
| ] | |
| }, | |
| } | |
| ``` | |
Xet Storage Details
- Size:
- 651 Bytes
- Xet hash:
- 70da7a13b6836389133f49fe7babedcb19a05b36d3ec19478b6c183dfdea632b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.