2019-02-19 22:45:07 +01:00
|
|
|
const { PHASE_DEVELOPMENT_SERVER } = require('next-server/constants')
|
2018-04-12 09:47:42 +02:00
|
|
|
|
|
|
|
module.exports = (phase) => {
|
|
|
|
return {
|
|
|
|
distDir: phase === PHASE_DEVELOPMENT_SERVER ? '.next-dev' : '.next',
|
2019-02-12 02:28:47 +01:00
|
|
|
publicRuntimeConfig: {
|
|
|
|
foo: 'foo'
|
|
|
|
},
|
|
|
|
serverRuntimeConfig: {
|
|
|
|
bar: 'bar'
|
|
|
|
},
|
2019-03-17 00:54:58 +01:00
|
|
|
experimental: {
|
|
|
|
// exportTrailingSlash: false
|
|
|
|
},
|
2018-04-12 09:47:42 +02:00
|
|
|
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' } },
|
2018-06-28 08:37:57 +02:00
|
|
|
'/file-name.md': { page: '/dynamic', query: { text: 'this file has an extension' } },
|
|
|
|
'/query': { page: '/query', query: { a: 'blue' } }
|
2018-04-12 09:47:42 +02:00
|
|
|
}
|
2019-03-13 00:30:03 +01:00
|
|
|
} // end exportPathMap
|
2017-05-09 23:03:20 +02:00
|
|
|
}
|
|
|
|
}
|