docs
  1. Storefront Hosting
  2. Configure
  3. Build Configuration

Build Configuration

The Build stage transforms your Storefront Application code into a deployable artifact. To simplify the process and remove the need to manage complex build configurations, SCAYLE uses a standardized container image in the background so you don't need to provide a Dockerfile in your repository.

The only required configuration for the build process is specifying a Node.js version constraint in the engines.node field of your package.json. This tells the platform which Node.js version to use for the build.

Node.js Version Selection

The platform supports all current Node.js Long Term Support (LTS) versions. When a build is triggered, the version constraint in your package.json is read and the most recent compatible Node.js image is selected.

For example, the following configuration in package.json:

This constraint indicates that your application requires a Node.js version of 22.15.0 or higher. The platform then selects the most up-to-date Node.js 22 image that satisfies the requirement, ensuring your build benefits from the latest security patches and performance improvements within that major version.

This approach gives you the flexibility to define your application's requirements while SCAYLE handles image selection and maintenance.

Node.js 20 Deprecation

Important Notice: Node.js 20 was deprecated and removed from our list of supported major versions on May 4, 2026. To ensure continued support and access to the latest features and security updates, please upgrade your Node.js version to 22 or 24 by updating your package.json file as follows:

For Node.js 22:

For Node.js 24:

URL Base Path

By default, your Storefront Application is served from the domain root (e.g., example.com/). If your storefront needs to be served from a URL sub-path (e.g., example.com/store/), configure the basePath inside a scayle object in package.json:

json

Fields:

  • framework - the Storefront framework your application uses. Required when basePath is set.
  • basePath - the URL sub-path where your storefront is served. Optional. When set: must be non-empty, must start with /, cannot be just /. A trailing slash is accepted.

When basePath is set, the platform serves all storefront routes - pages, API endpoints, health checks, and build assets - under the prefix. Requests to the exact root / redirect to the base path.

Application-side configuration

Setting basePath in package.json is only one side of the setup. You also need to configure your Storefront Application to run under the same base path.

The basePath and your application's configuration must match - mismatches cause deployment failures.