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
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
..
components Add dynamic-import support for next-export. 2017-05-15 10:03:35 +05:30
pages Merge url query with exportPathMap (#4678) 2018-06-28 08:37:57 +02:00
test Merge url query with exportPathMap (#4678) 2018-06-28 08:37:57 +02:00
.gitignore Add build manifest (#4119) 2018-04-12 09:47:42 +02:00
next.config.js Merge url query with exportPathMap (#4678) 2018-06-28 08:37:57 +02:00