Configure Web Build Script¶
When building native apps with Capawesome Cloud, the platform needs to generate your web assets before creating the native builds. This guide explains how Capawesome Cloud determines which npm script to use for building your web application.
Build Script Priority¶
Capawesome Cloud follows a specific priority order when determining which script to execute for generating your web build:
capawesome:buildscript: If defined in yourpackage.json, this script will be used.buildscript: Ifcapawesome:buildis not defined, the standardbuildscript will be used.- Build failure: If neither script exists, the web build will fail.
For most projects, the standard build script is sufficient:
If you need different build configurations for Capawesome Cloud builds versus local builds, define a capawesome:build script:
This is useful when you need to apply production-specific optimizations, enable different build flags, or run additional build steps for native apps.
Configuration File Override¶
You can also explicitly configure the web build command in your capawesome.config.json file:
This approach gives you complete control over the build command and takes precedence over the automatic script detection. Learn more about configuration options in the App Configuration documentation.