Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Oct 26, 2022
1 parent 3b0eeda commit 0d330f8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
1 change: 0 additions & 1 deletion packages/next/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ import { RemotePattern } from '../shared/lib/image-config'
import { eventSwcPlugins } from '../telemetry/events/swc-plugins'
import { normalizeAppPath } from '../shared/lib/router/utils/app-paths'
import { AppBuildManifest } from './webpack/plugins/app-build-manifest-plugin'
import { EntryObject } from 'webpack'

export type SsgRoute = {
initialRevalidateSeconds: number | false
Expand Down
9 changes: 2 additions & 7 deletions packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
SERVER_DIRECTORY,
COMPILER_NAMES,
CompilerNameValues,
APP_INTERNALS,
APP_CLIENT_INTERNALS,
} from '../shared/lib/constants'
import { execOnce } from '../shared/lib/utils'
import { NextConfigComplete } from '../server/config-shared'
Expand Down Expand Up @@ -79,11 +79,6 @@ const babelIncludeRegexes: RegExp[] = [

const reactPackagesRegex = /^(react(?:$|\/)|react-dom(?:$|\/))/

const builtinReactPackages = [
/next[\\/]dist[\\/]compiled[\\/](react|react-dom)[\\/]/,
/next[\\/]dist[\\/]compiled[\\/]react-server-dom-webpack[\\/]server.browser/,
]

const staticGenerationAsyncStorageRegex =
/next[\\/]dist[\\/]client[\\/]components[\\/]static-generation-async-storage/

Expand Down Expand Up @@ -1449,7 +1444,7 @@ export default async function getBaseWebpackConfig(
name &&
hasAppDir &&
(name === CLIENT_STATIC_FILES_RUNTIME_MAIN_APP ||
name === APP_INTERNALS ||
name === APP_CLIENT_INTERNALS ||
name.startsWith('app/'))
) {
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {
} from '../loaders/next-flight-client-entry-loader'
import { APP_DIR_ALIAS, WEBPACK_LAYERS } from '../../../lib/constants'
import {
APP_INTERNALS,
APP_CLIENT_INTERNALS,
COMPILER_NAMES,
EDGE_RUNTIME_WEBPACK,
FLIGHT_SERVER_CSS_MANIFEST,
Expand Down Expand Up @@ -221,7 +221,7 @@ export class FlightClientEntryPlugin {
compilation,
entryName: name,
clientComponentImports: [...internalClientComponentEntryImports],
bundlePath: APP_INTERNALS,
bundlePath: APP_CLIENT_INTERNALS,
})
)
})
Expand Down
2 changes: 1 addition & 1 deletion packages/next/shared/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const MIDDLEWARE_REACT_LOADABLE_MANIFEST =
export const CLIENT_STATIC_FILES_RUNTIME_MAIN = `main`
export const CLIENT_STATIC_FILES_RUNTIME_MAIN_APP = `${CLIENT_STATIC_FILES_RUNTIME_MAIN}-app`
// next internal client components chunk for layouts
export const APP_INTERNALS = 'app-internals'
export const APP_CLIENT_INTERNALS = 'app-client-internals'
// static/runtime/react-refresh.js
export const CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH = `react-refresh`
// static/runtime/amp.js
Expand Down

0 comments on commit 0d330f8

Please sign in to comment.