Appearance
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.
How to generate a bundle
Navigate into the starter kit:
bashcd canva-apps-sdk-starter-kitRun the following command:
bashnpm run buildAn
app.jsfile will appear in thedistdirectory.
How to upload a bundle
- Log in to the Developer Portal.
- Navigate to an app via the Your apps page.
- Upload the
app.jsfile to the App source > JavaScript file field.
Known limitations
- 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.)
- The size of the app bundle must not exceed 5MB.