Building an application

The page provides instructions for building an application so it can be deployed to production.


Your application must be committed to a Git repository before you can build the application. The application’s build script creates version strings based on your HEAD branch’s commit count, hash, and branch descriptor.

Building an application

To build an application, follow the steps below:

  1. Commit any pending changes in your application to Git. The example commands below commit all modified and untracked files:

    git add --all
    git commit -m "<message>"
  2. From the root directory of your application, run the command below to build the application:

    npm run build

The build task writes a JavaScript bundle and a Java web application archive (WAR) file under your application’s build directory:

├── dist
│   ├── index.html
│   └── static
│       └── bundle-dev.js
└── exported-wars
    └── MyApp.war

The WAR file is an archived version of the contents of the build/dist directory and can be deployed to a Java application server.