Unverified Commit c8799f9e authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Enable catchAllRouting by default (#9922)

parent 1546fcdc
...@@ -546,13 +546,6 @@ export default async function build(dir: string, conf = null): Promise<void> { ...@@ -546,13 +546,6 @@ export default async function build(dir: string, conf = null): Promise<void> {
await writeBuildId(distDir, buildId) await writeBuildId(distDir, buildId)
if (config.experimental.catchAllRouting !== true) {
if (dynamicRoutes.some(page => /\/\[\.{3}[^/]+?\](?=\/|$)/.test(page))) {
throw new Error(
'Catch-all routing is still experimental. You cannot use it yet.'
)
}
}
const finalPrerenderRoutes: { [route: string]: SprRoute } = {} const finalPrerenderRoutes: { [route: string]: SprRoute } = {}
const tbdPrerenderRoutes: string[] = [] const tbdPrerenderRoutes: string[] = []
......
...@@ -42,7 +42,6 @@ const defaultConfig: { [key: string]: any } = { ...@@ -42,7 +42,6 @@ const defaultConfig: { [key: string]: any } = {
(Number(process.env.CIRCLE_NODE_TOTAL) || (Number(process.env.CIRCLE_NODE_TOTAL) ||
(os.cpus() || { length: 1 }).length) - 1 (os.cpus() || { length: 1 }).length) - 1
), ),
catchAllRouting: false,
css: false, css: false,
documentMiddleware: false, documentMiddleware: false,
granularChunks: false, granularChunks: false,
......
module.exports = { module.exports = {
experimental: { experimental: {
modern: true, modern: true,
catchAllRouting: true,
}, },
} }
...@@ -461,8 +461,7 @@ describe('Dynamic Routing', () => { ...@@ -461,8 +461,7 @@ describe('Dynamic Routing', () => {
` `
module.exports = { module.exports = {
experimental: { experimental: {
modern: true, modern: true
catchAllRouting: true
} }
} }
` `
...@@ -487,8 +486,7 @@ describe('Dynamic Routing', () => { ...@@ -487,8 +486,7 @@ describe('Dynamic Routing', () => {
module.exports = { module.exports = {
target: 'serverless', target: 'serverless',
experimental: { experimental: {
modern: true, modern: true
catchAllRouting: true
} }
} }
` `
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment