Skip to content

Update backoffice-entry-point.md #7042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: The Backoffice Entry Point extension type is used to run some JavaS

# Backoffice Entry Point

This manifest declares a single JavaScript file that will be loaded and run when the Backoffice starts. In other words this can be used as an entry point for a package.
This manifest declares a single JavaScript file that will be loaded and run when the Backoffice starts. In other words, this can be used as an entry point for a package.

The `backofficeEntryPoint` extension is also the way to go if you want to load in external libraries such as jQuery, Angular, React, etc. You can use the `backofficeEntryPoint` to load in the external libraries to be shared by all your extensions. Additionally, **global CSS files** can also be used in the `backofficeEntryPoint` extension.

Expand Down Expand Up @@ -43,14 +43,14 @@ import type { UmbEntryPointOnInit } from '@umbraco-cms/backoffice/extension-api'
/**
* Perform any initialization logic when the Backoffice starts
*/
export const onInit: UmbEntryPointOnInit = (host, extensionsRegistry) => {
export const onInit: UmbEntryPointOnInit = (host, extensionRegistry) => {
// Your initialization logic here
}

/**
* Perform any cleanup logic when the Backoffice and/or the package is unloaded
*/
export const onUnload: UmbEntryPointOnUnload = (host, extensionsRegistry) => {
export const onUnload: UmbEntryPointOnUnload = (host, extensionRegistry) => {
// Your cleanup logic here
}
```
Expand Down Expand Up @@ -78,14 +78,14 @@ const manifest: UmbExtensionManifest = {
}
};

export const onInit: UmbEntryPointOnInit = (host, extensionsRegistry) => {
export const onInit: UmbEntryPointOnInit = (host, extensionRegistry) => {
// Register the extension
extensionRegistry.register(manifest);
}

export const onUnload: UmbEntryPointOnUnload = (host, extensionsRegistry) => {
export const onUnload: UmbEntryPointOnUnload = (host, extensionRegistry) => {
// Unregister the extension (optional)
extension.unregister(manifest);
extensionRegistry.unregister(manifest);
}
```
{% endcode %}
Expand Down Expand Up @@ -139,7 +139,7 @@ const manifests: Array<UmbExtensionManifest> = [
...
];

export const onInit: UmbEntryPointOnInit = (host, extensionsRegistry) => {
export const onInit: UmbEntryPointOnInit = (host, extensionRegistry) => {
// Register the extensions
extensionRegistry.registerMany(manifests);
}
Expand Down