未验证 提交 c8799f9e 编写于 作者: T Tim Neutkens 提交者: GitHub

Enable catchAllRouting by default (#9922)

上级 1546fcdc
......@@ -546,13 +546,6 @@ export default async function build(dir: string, conf = null): Promise<void> {
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 tbdPrerenderRoutes: string[] = []
......
......@@ -42,7 +42,6 @@ const defaultConfig: { [key: string]: any } = {
(Number(process.env.CIRCLE_NODE_TOTAL) ||
(os.cpus() || { length: 1 }).length) - 1
),
catchAllRouting: false,
css: false,
documentMiddleware: false,
granularChunks: false,
......
module.exports = {
experimental: {
modern: true,
catchAllRouting: true,
},
}
......@@ -461,8 +461,7 @@ describe('Dynamic Routing', () => {
`
module.exports = {
experimental: {
modern: true,
catchAllRouting: true
modern: true
}
}
`
......@@ -487,8 +486,7 @@ describe('Dynamic Routing', () => {
module.exports = {
target: 'serverless',
experimental: {
modern: true,
catchAllRouting: true
modern: true
}
}
`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册