Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Feb 16, 2020
1 parent 98852c4 commit ed7bfc1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/next/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -947,12 +947,9 @@ function generateClientSsgManifest(
prerenderManifest: PrerenderManifest,
{ buildId, distDir }: { buildId: string; distDir: string }
) {
const regexOperatorsRegex = /[|\\{}()[\]^$+*?.-]/g
const ssgMatchers: RegExp[] = []
Object.keys(prerenderManifest.routes).forEach(route =>
ssgMatchers.push(
new RegExp('^' + route.replace(regexOperatorsRegex, '\\$&') + '$')
)
ssgMatchers.push(new RegExp('^' + escapeStringRegexp(route) + '$'))
)
Object.values(prerenderManifest.dynamicRoutes).forEach(entry =>
ssgMatchers.push(new RegExp(entry.routeRegex))
Expand Down

0 comments on commit ed7bfc1

Please sign in to comment.