rsnext/test/integration/export/next.config.js
JJ Kasper 8a8cde1b39
Refresh query on mount for exported pages (#7462)
* Refresh query on mount for exported pages

* Make sure to only refresh query if it is different

* Only update if search isn't empty

* Merge pre-rendered query values with
current query values

* Remove dynamic restriction for autoExporting

* Update dynamic routing test fo autoExport

* Remove autoExport from client-navigation test

* Remove logs and update trailing slash config

* Update nextExport tests in client-navigation

* Disable autoExport in export suite
2019-05-30 17:34:05 -07:00

42 lines
1.2 KiB
JavaScript

const { PHASE_DEVELOPMENT_SERVER } = require('next-server/constants')
module.exports = phase => {
return {
distDir: phase === PHASE_DEVELOPMENT_SERVER ? '.next-dev' : '.next',
publicRuntimeConfig: {
foo: 'foo'
},
serverRuntimeConfig: {
bar: 'bar'
},
experimental: {
// exportTrailingSlash: false,
},
exportPathMap: function () {
return {
'/': { page: '/' },
'/about': { page: '/about' },
'/button-link': { page: '/button-link' },
'/get-initial-props-with-no-query': {
page: '/get-initial-props-with-no-query'
},
'/counter': { page: '/counter' },
'/dynamic-imports': { page: '/dynamic-imports' },
'/dynamic': { page: '/dynamic', query: { text: 'cool dynamic text' } },
'/dynamic/one': {
page: '/dynamic',
query: { text: 'next export is nice' }
},
'/dynamic/two': {
page: '/dynamic',
query: { text: 'zeit is awesome' }
},
'/file-name.md': {
page: '/dynamic',
query: { text: 'this file has an extension' }
},
'/query': { page: '/query', query: { a: 'blue' } }
}
} // end exportPathMap
}
}