rsnext/test/integration/export/next.config.js
JJ Kasper b1025995b2
Update to reject when test command fails (#13722)
As noticed in https://github.com/vercel/next.js/pull/13506 when a build or export command fails the tests can just stall. This attempts to address that by rejecting when the command doesn't exit correctly and `stdout` and `stderr` aren't being looked at
2020-06-09 18:28:15 +00:00

47 lines
1.5 KiB
JavaScript

const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
module.exports = (phase) => {
return {
distDir: phase === PHASE_DEVELOPMENT_SERVER ? '.next-dev' : '.next',
publicRuntimeConfig: {
foo: 'foo',
},
serverRuntimeConfig: {
bar: 'bar',
},
exportTrailingSlash: true,
exportPathMap: function () {
return {
'/': { page: '/' },
'/index': { page: '/' },
'/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',
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
}
}