cdd54afb0d
* Add automatic exporting of pages with no getInitialProps * Add support for exporting serverless to static and serving the html files during next start * Fix missing runtimeEnv when requiring page, re-add warning when trying to export with serverless, and update tests * Update flying-shuttle test * revert un-used pagesManifest change * remove query.amp RegExp test * Fix windows backslashes not being replaced * Re-enable serverless support for next start * bump * Fix getInitialProps check * Fix incorrect error check * Re-add check for reserved pages * Fix static check * Update to ignore /api pages and clean up some tests * Re-add needed next.config for test and correct behavior * Update RegExp for ignored pages for auto-static * Add checking for custom getInitialProps in pages/_app * Update isPageStatic logic to only use default export * Re-add retrying to CircleCi * Update query during dev to only have values available during export for static pages * Fix test * Add warning when page without default export is found and make sure to update pages-manifest correctly in flying-shuttle mode * Fix backslashes not being replaced * Integrate auto-static with flying-shuttle and make sure AMP is handled in flying-shuttle * Add autoExport for opting in
32 lines
1.1 KiB
JavaScript
32 lines
1.1 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,
|
|
autoExport: true
|
|
},
|
|
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
|
|
}
|
|
}
|