1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/server
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
..
lib Move build directory outside of server folder (#4565) 2018-06-14 19:30:14 +02:00
config.js Add CONFIG_FILE constant, add types for server/config.js (#4529) 2018-06-04 11:38:46 +02:00
document.js Expose app.js (#4129) 2018-04-12 10:33:22 +02:00
export.js Process available chunk names properly in dev mode (#4604) 2018-06-14 11:04:03 +02:00
hot-reloader.js Pass through buildId to webpack config in development (#4665) 2018-06-25 23:06:46 +02:00
index.js Merge url query with exportPathMap (#4678) 2018-06-28 08:37:57 +02:00
next.js Programmatic API (#310) 2016-12-16 12:33:08 -08:00
on-demand-entry-handler.js Move build directory outside of server folder (#4565) 2018-06-14 19:30:14 +02:00
render.js Fix incorrect wording (#4658) 2018-06-24 17:10:24 +02:00
require.js Clean up references to this.dir and this.dist everywhere (#4535) 2018-06-04 15:45:39 +02:00
router.js Use a latest version of path-to-regexp for path-match (#3655) 2018-02-01 19:54:09 +01:00
utils.js Properly escape the dot character in regexp (#4608) 2018-06-14 19:47:49 +02:00