Skip to content

Commit

Permalink
use constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Schniz committed Jan 12, 2022
1 parent 4dbec5d commit bdd9a17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/next/build/webpack/plugins/middleware-plugin.ts
Expand Up @@ -7,6 +7,7 @@ import {
MIDDLEWARE_BUILD_MANIFEST,
MIDDLEWARE_REACT_LOADABLE_MANIFEST,
MIDDLEWARE_RUNTIME_WEBPACK,
MIDDLEWARE_SSR_RUNTIME_WEBPACK,
} from '../../../shared/lib/constants'
import { MIDDLEWARE_ROUTE } from '../../../lib/constants'
import { nonNullable } from '../../../lib/non-nullable'
Expand Down Expand Up @@ -142,8 +143,8 @@ export default class MiddlewarePlugin {

for (const [name, info] of compilation.entries) {
if (
name.match(MIDDLEWARE_ROUTE) ||
info.options.runtime === 'middleware-ssr-runtime'
info.options.runtime === MIDDLEWARE_SSR_RUNTIME_WEBPACK ||
name.match(MIDDLEWARE_ROUTE)
) {
const middlewareEntries = new Set<webpack5.Module>()
const env = new Set<string>()
Expand Down

0 comments on commit bdd9a17

Please sign in to comment.