nextbuild

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTurbopackOutput

func IsTurbopackOutput(standaloneDir string) bool

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.

func Run

func Run(ctx context.Context, opts Opts) error

Types

type Opts

type Opts struct {
	ProjectDir string

	Target Target

	Log *shared.Logger

	ExtraArgs []string
}

type Target

type Target string
const (
	TargetCloudflareWorker Target = "cloudflare-worker"
	TargetAWSLambda        Target = "aws-lambda"
	TargetVPS              Target = "vps"
	TargetGeneric          Target = "generic"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL