Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Oct 26, 2022
1 parent 0d330f8 commit e0bee9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/next/build/index.ts
Expand Up @@ -60,7 +60,7 @@ import {
RSC_MODULE_TYPES,
FONT_LOADER_MANIFEST,
CLIENT_STATIC_FILES_RUNTIME_MAIN_APP,
APP_INTERNALS,
APP_CLIENT_INTERNALS,
} from '../shared/lib/constants'
import { getSortedRoutes, isDynamicRoute } from '../shared/lib/router/utils'
import { __ApiPreviewProps } from '../server/api-utils'
Expand Down Expand Up @@ -978,7 +978,7 @@ export default async function build(
if (!serverResult.errors.length && !edgeServerResult?.errors.length) {
injectedClientEntries.forEach((value, key) => {
const clientEntry = clientConfig.entry as webpack.EntryObject
if (key === APP_INTERNALS) {
if (key === APP_CLIENT_INTERNALS) {
clientEntry[CLIENT_STATIC_FILES_RUNTIME_MAIN_APP] = [
// TODO-APP: cast clientEntry[CLIENT_STATIC_FILES_RUNTIME_MAIN_APP] to type EntryDescription once it's available from webpack
// @ts-ignore clientEntry['main-app'] is type EntryDescription { import: ... }
Expand Down
@@ -1,7 +1,6 @@
import { stringify } from 'querystring'
import path from 'path'
import { webpack, sources } from 'next/dist/compiled/webpack/webpack'
import type { Dependency, EntryOptions } from 'webpack'
import {
getInvalidator,
entries,
Expand Down Expand Up @@ -519,8 +518,8 @@ export class FlightClientEntryPlugin {
addEntry(
compilation: any,
context: string,
dependency: Dependency,
options: EntryOptions
dependency: any /* Dependency */,
options: any /* EntryOptions */
): Promise<any> /* Promise<module> */ {
return new Promise((resolve, reject) => {
const entry = compilation.entries.get(options.name)
Expand Down

0 comments on commit e0bee9c

Please sign in to comment.