-
Notifications
You must be signed in to change notification settings - Fork 26.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f519bc
commit b92879d
Showing
10 changed files
with
380 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/next/build/webpack/loaders/get-module-build-info.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { webpack5 } from 'next/dist/compiled/webpack/webpack' | ||
|
||
/** | ||
* A getter for module build info that casts to the type it should have. | ||
* We also expose here types to make easier to use it. | ||
*/ | ||
export function getModuleBuildInfo(webpackModule: webpack5.Module) { | ||
return webpackModule.buildInfo as { | ||
nextEdgeMiddleware?: EdgeMiddlewareMeta | ||
nextEdgeSSR?: EdgeSSRMeta | ||
nextUsedEnvVars?: Set<string> | ||
nextWasmMiddlewareBinding?: WasmBinding | ||
usingIndirectEval?: boolean | Set<string> | ||
} | ||
} | ||
|
||
export interface EdgeMiddlewareMeta { | ||
page: string | ||
} | ||
|
||
export interface EdgeSSRMeta { | ||
isServerComponent: boolean | ||
page: string | ||
} | ||
|
||
export interface WasmBinding { | ||
filePath: string | ||
name: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 3 additions & 7 deletions
10
packages/next/build/webpack/loaders/next-middleware-wasm-loader.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.