mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
e98a877ee4
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.
13 lines
224 B
JavaScript
13 lines
224 B
JavaScript
import { Component } from 'react'
|
|
|
|
class Page extends Component {
|
|
static getInitialProps ({ query }) {
|
|
return { query }
|
|
}
|
|
render () {
|
|
return JSON.stringify(this.props.query, null, 2)
|
|
}
|
|
}
|
|
|
|
export default Page
|