rsnext/test/integration/prerender/pages
Jan Potoms bc2cb2210f
Fix prerendered nested index handling (#14383)
Noticed this while reviewing https://github.com/vercel/next.js/pull/14376. After having done https://github.com/vercel/next.js/pull/13699, this code didn't feel right to me:
```js
function prepareRoute(path: string) {
  path = delBasePath(path || '')
  // this /index rewrite is problematic, it makes pages/index.js 
  // and pages/index/index.js point to the same thing:
  return toRoute(!path || path === '/' ? '/index' : path)
}
```
Added a nested index page to the prerender tests and found it was rendering the `/` route on navigation. This uncovered 2 more places around the dataroute where the index path was not translated correctly.

**edit:**

Just to note that there was nothing wrong with https://github.com/vercel/next.js/pull/14376, the issue was already there, I just noticed it while reading that PR
2020-06-23 05:49:48 +00:00
..
another Rename unstable GSP field (#11602) 2020-04-02 14:29:41 -04:00
api Propagate Serverless Errors to Platform (#12841) 2020-06-01 23:12:45 +00:00
blog Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
catchall Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
catchall-explicit Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
catchall-optional Fix prefetch and some other issues with optional catch all (#14400) 2020-06-22 03:00:30 +00:00
fallback-only Handle encoding for data requests and fix fallback response (#13622) 2020-06-01 13:25:00 +00:00
index Fix prerendered nested index handling (#14383) 2020-06-23 05:49:48 +00:00
lang/[lang] Add support for rewriting non-fallback SSG pages (#11010) 2020-05-29 16:33:09 +00:00
non-json Verify GS(S)P Serializability (#10857) 2020-03-09 13:30:44 -04:00
user/[user] Rename unstable GSP field (#11602) 2020-04-02 14:29:41 -04:00
bad-gssp.js Propagate Serverless Errors to Platform (#12841) 2020-06-01 23:12:45 +00:00
bad-ssr.js Propagate Serverless Errors to Platform (#12841) 2020-06-01 23:12:45 +00:00
default-revalidate.js Remove old eslint-ignores from unstable_ prefix (#10740) 2020-02-28 12:40:27 -05:00
index.js Fix prerendered nested index handling (#14383) 2020-06-23 05:49:48 +00:00
normal.js Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
something.js Rename unstable GSP field (#11602) 2020-04-02 14:29:41 -04:00