Gather Extension Manifests in one file
The bundle
Extension Type points to a single JavaScript file that exports or re-exports Extension Manifests written in JavaScript.
It can be used as the entry point for a package, or as a grouping for a set of manifests. A Bundle can reference other Bundles.
Use Bundle as an entry point for a packageIf you want to declare your manifests in JavaScript/TypeScript, the Bundle is a great choice.
The following example shows an umbraco-package.json
that refers to one bundle, which can then declare manifests.
{
"name": "My Package Name",
"version": "1.0.0",
"extensions": [
{
"type": "bundle",
"alias": "My.Package.Bundle",
"name": "My Package Bundle",
"js": "/App_Plugins/my-package/manifests.js"
}
]
}
export const manifests: Array<UmbExtensionManifest> = [
{
type: 'dashboard',
name: 'Example Dashboard',
alias: 'example.dashboard.demo',
element: () => import('./demo-dashboard.js'),
weight: 900,
meta: {
label: 'Demo example',
pathname: 'demo-example',
},
},
// ... insert as many manifests as you like
]
Ensure you have set up your tsconfig.json
to include the extension-types
as global types. Like this:
{
"compilerOptions": {
...
"types": [
"@umbraco-cms/backoffice/extension-types"
]
}
}
Last updated 2 months ago
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4