Skip to content

Commit

Permalink
update build info
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Nov 5, 2021
1 parent 4b95f7f commit 916faf8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion packages/next/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ import {
getCssFilePaths,
getUnresolvedModuleFromError,
isReservedPage,
isCustomErrorPage,
} from './utils'
import getBaseWebpackConfig from './webpack-config'
import { PagesManifest } from './webpack/plugins/pages-manifest-plugin'
Expand Down Expand Up @@ -1028,7 +1029,8 @@ export default async function build(
isWebSsr:
hasConcurrentFeatures &&
!isMiddlewareRoute &&
!isReservedPage(page),
!isReservedPage(page) &&
!isCustomErrorPage(page),
isHybridAmp,
ssgPageRoutes,
initialRevalidateSeconds: false,
Expand Down
4 changes: 1 addition & 3 deletions packages/next/build/webpack/plugins/middleware-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ export default class MiddlewarePlugin {
const location = result
? `/${result[1]}`
: ssrEntryInfo
? entrypoint.name
.slice(entrypoint.name.startsWith('pages') ? 'pages'.length : 0)
.replace(/\/index$/, '') || '/'
? entrypoint.name.slice('pages'.length).replace(/\/index$/, '') || '/'
: null

if (!location) {
Expand Down

0 comments on commit 916faf8

Please sign in to comment.