rsnext/test/integration/export/next.config.js

48 lines
1.6 KiB
JavaScript
Raw Normal View History

const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
2020-05-18 21:24:37 +02:00
module.exports = (phase) => {
return {
distDir: phase === PHASE_DEVELOPMENT_SERVER ? '.next-dev' : '.next',
publicRuntimeConfig: {
foo: 'foo',
},
serverRuntimeConfig: {
bar: 'bar',
},
exportTrailingSlash: true,
2020-05-18 21:24:37 +02:00
exportPathMap: function () {
return {
'/': { page: '/' },
'/index': { page: '/index' },
'/about': { page: '/about' },
'/button-link': { page: '/button-link' },
'/hash-link': { page: '/hash-link' },
'/empty-hash-link': { page: '/empty-hash-link' },
'/empty-query-link': { page: '/empty-query-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',
2020-05-09 17:21:53 +02:00
query: { text: 'Vercel is awesome' },
},
'/file-name.md': {
page: '/dynamic',
query: { text: 'this file has an extension' },
},
'/query': { page: '/query', query: { a: 'blue' } },
'/query-update': { page: '/query-update', query: { a: 'blue' } },
// API route
'/blog/nextjs/comment/test': { page: '/blog/[post]/comment/[id]' },
}
}, // end exportPathMap
2017-05-09 23:03:20 +02:00
}
}