App bundles
AppBundle is an entity for hosting your app on Contentful. An AppBundle is a sub-resource of an AppDefinition.
To create it you will need to create an AppUpload first and link it during the creation of the bundle.
The entity itself contains information about the files of the upload and the AppDefinition it relates to.
Additionally, it is possible to add a comment to every bundle to identify it later on.
To enable an AppBundle, you need to link it in the AppDefinition entity with the bundle property.
If your app has a frontend, it can either be hosted by Contentful using an appBundle or hosted outside of Contentful using the src property.
The AppBundle entity is also used to host code to run Contentful Functions, serverless workloads that run on Contentful’s infrastructure to provide enhanced flexibility and customization.
A bundle can contain frontend files, functions code, or both.
Limitations:
- Every
AppBundlecontaining frontend code needs a validindex.htmlfile at the root level of the folder. - All internal links to your assets like stylesheets, JS files or others from the
index.htmlmust be relative paths. - If an
AppDefinitionhas abundleproperty linking to anAppBundlecontaining frontend code, then the app definition cannot also have asrcproperty