fastly compute build
Build a Compute package locally.
Syntax
$ fastly compute buildOptions
| Key | Required? | Default | Description | 
|---|---|---|---|
| --dir | No | Project directory to build (default: current directory) | |
| --env | No | The manifest environment config to use (e.g. 'stage' will attempt to read 'fastly.stage.toml') | |
| --include-source | No | Include source code in built package | |
| --language | No | Language type | |
| --metadata-disable | No | Disable Wasm binary metadata annotations | |
| --metadata-filter-envvars | No | Redact specified environment variables from [scripts.env_vars] using comma-separated list | |
| --metadata-show | No | Inspect the Wasm binary metadata | |
| --package-name | No | Package name | |
| --timeout | No | Timeout, in seconds, for the build compilation step | 
Global options
| Key | Required? | Default | Description | 
|---|---|---|---|
| --help | No | Show context-sensitive help. | |
| --accept-defaults | No | Accept default options for all interactive prompts apart from Yes/No confirmations | |
| --auto-yes | No | Answer yes automatically to all Yes/No confirmations. This may suppress security warnings | |
| --debug-mode | No | Print API request and response details (NOTE: can disrupt the normal CLI flow output formatting) | |
| --enable-sso | No | Enable Single-Sign On (SSO) for current profile execution (see also: 'fastly sso') | |
| --non-interactive | No | Do not prompt for user input - suitable for CI processes. Equivalent to --accept-defaults and --auto-yes | |
| --profile | No | Switch account profile for single command execution (see also: 'fastly profile switch') | |
| --quiet | No | Silence all output except direct command output. This won't prevent interactive prompts (see: --accept-defaults, --auto-yes, --non-interactive) | |
| --token | No | Fastly API token (or via FASTLY_API_TOKEN) | |
| --verbose | No | Verbose logging | 
Examples
Build a JavaScript Compute package using Yarn instead of NPM
In the fastly.toml manifest define a new [scripts] table and within it define a build key with your Yarn instructions. For example, build = "yarn install && yarn build".
$ fastly compute build