Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTurbopackOutput ¶
IsTurbopackOutput reports whether the given Next.js standalone tree was produced by Turbopack rather than Webpack.
Detection signal: Turbopack emits chunks named `[turbopack]_*.js` and `[root-of-the-server]__*._.js` under `.next/server/chunks/ssr/`. Webpack-mode standalone output never produces these filenames.
standaloneDir is the path to the extracted standalone tree (the directory containing server.js + .next/). For a not-yet-extracted build, point at the project root and the function will look at `.next/server/chunks/`.
Returns false (no error) when the tree doesn't exist — callers that need to distinguish "not built" from "built with Webpack" should stat the path themselves.