Bundling apps

How to generate a JavaScript bundle for an app.

When you're ready to submit an app for review, you need to upload the app to the Developer Portal as a standalone JavaScript bundle. The starter kit includes a build script that handles this for you.

  1. Navigate into the starter kit:

    cd canva-apps-sdk-starter-kit
    bash
  2. Run the following command:

    npm run build
    bash

    An app.js file will appear in the dist directory.

  1. Log in to the Developer Portal.
  2. Navigate to an app via the Your apps page.
  3. Upload the app.js file to the App source > JavaScript file field.
  • Canva doesn't support code-splitting, so all code and dependencies must be bundled in a single file. (You can still organize your code into separate files. The webpack configuration in the starter kit takes care of the bundling.)