Build, Upload, and Submit
When your app works with the development URL, build the production bundle, upload it, test it hosted, and submit the app for review.
Step 1: Set the production values
HOOTSUITE_APP_ID, HOOTSUITE_DASHBOARD_URL, and BACKEND_HOST are written into app.js when it is built. Set them in .env before you build:
HOOTSUITE_APP_ID=<YOUR_APP_ID>
HOOTSUITE_DASHBOARD_URL=https://hootsuite.com
BACKEND_HOST=https://<YOUR_BACKEND_HOST>
BACKEND_HOSTmust be the public HTTPS URL of your deployed backend. See Call your own backend.HOOTSUITE_APP_IDmust match the app in the Developer Portal.
Step 2: Build the bundle
-
Run:
npm run build -
Check the output for this message:
[Webpack] BACKEND_HOST should not be localhost for production builds!If it appears,
BACKEND_HOSTstill points tolocalhost. Fix.envand build again. -
Check that
dist/app.jsexists. The build always produces this single file: Hootsuite requires oneapp.js, so the template disables code splitting. Images, SVGs, and fonts that you import are inlined into it. The build also writesdist/app.js.LICENSE.txtwith the license notices of bundled libraries; you do not upload it.
Webpack may warn that app.js exceeds its recommended size and suggest code splitting. You can ignore this warning: splitting the bundle is not supported. Keep your app.js bundle small, because a smaller bundle opens faster.
Step 3: Upload the bundle
- In the Developer Portal, open your app's Embedded extension settings.
- Select Load from uploaded bundle.
- Upload
dist/app.jsand wait for the upload to complete. - Click Save settings. The upload is not used until you save.
- Open the app in Hootsuite and check that it loads the new version.
Hootsuite serves the bundle from https://<appId>.hootsuite-apps.com. To release a change, build, upload, and save again.
Step 4: Test the hosted app
Run the test checklist against the hosted bundle and your production backend. In particular, check that:
- The browser console has no CORS, mixed-content, or other errors.
- An expired token is renewed without the user noticing, and a revoked token makes the app show Reconnect. Data loads again after the user clicks it and consents. See Token renewal.
- The app handles empty, error, and missing-context states.
Step 5: Submit the app
- Complete your listing: logo, description, features, and screenshots. See App Listing Requirements.
- Review the Best Practices that apply to Embedded apps, such as HTTPS everywhere, no console messages, fast loading, and WCAG 2.1 AA.
- In My Apps, open the app's Review & Submit section and submit it. See App Submission Process for what happens during review.
Before submitting, make sure that:
- The extension is in Load from uploaded bundle mode, with the latest
app.jssaved. - The extension has the surfaces you want selected.
-
BACKEND_HOSTpoints to your production backend, on a stable HTTPS domain. - Your backend allows CORS from
https://<appId>.hootsuite-apps.comand does not store or log access tokens. - OAuth 2.0 is configured with the scopes your app needs, and the Hootsuite redirect URL is registered with your provider.