1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/test/integration/static/pages
Luc e98a877ee4 Merge url query with exportPathMap (#4678)
This PR fixes #4615

From the issue :
> One thing we might consider is merging and showing a warning for keys not defined in exportPathMap

The behaviour after this PR is the following :

```js
// next.config.js
module.exports = {
  exportPathMap: () => ({
    '/': { page: '/', query: { a: 'blue' } }
  })
}
```

| url called | `ctx.query` | warning ? |
|-|-|-|
| `/` | `{ a: 'blue' }` | |
| `/?a=red` | `{ a: 'blue' }` | |
| `/?b=green` | `{ a: 'blue', b: 'green' }` | `... parameter 'b' missing in exportPathMap` |

Is that the expected behaviour ? If not, I'll update the PR to shape the expected behavior.
2018-06-28 08:37:57 +02:00
..
level1 Add some test cases for nested pages with next export. 2017-05-11 09:09:31 -07:00
about.js Added the test app for static export. 2017-05-09 14:03:20 -07:00
asset.js Handle empty assetPrefix scenario properly. (#3667) 2018-02-03 17:12:01 +01:00
button-link.js Rewrite url when exporting only if there's a href. (#2316) 2017-06-20 14:07:36 +05:30
counter.js Add a test case for client side routing for next export. 2017-05-11 08:52:28 -07:00
dynamic-imports.js Add dynamic-import support for next-export. 2017-05-15 10:03:35 +05:30
dynamic.js Rewrite urls with hashes correct for static export. (#2242) 2017-06-13 11:44:31 +05:30
get-initial-props-with-no-query.js Add a default value of '{}' to query in the export mode. (#2003) 2017-05-18 10:54:57 +05:30
index.js Allow use of filenames in exportPathMap (#2973) 2017-10-05 20:33:10 +02:00
query.js Merge url query with exportPathMap (#4678) 2018-06-28 08:37:57 +02:00