Entry Point

This page is a work in progress. It will be updated as the software evolves.

The entryPoint extension type can be used to run some JavaScript code at startup. The entry point 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 entryPoint 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 entryPoint to load in the external libraries to be shared by all your extensions. Additionally, global CSS files can also be used in the entryPoint extension.

The Entry Point manifest type is used to register an entry point for the backoffice. An entry point is a single javascript file that is loaded when the backoffice is initialized. This file can be used to do anything, this enables more complex logic to take place on startup.

Register an entry point in a JSON manifest

{
	"type": "entryPoint",
	"alias": "My.EntryPoint",
	"js": "./index.js"
}

Register additional UI extensions in the entry point file

import { extensionRegistry } from "@umbraco-cms/extension-registry"

const manifest = {
  {
    type: '', // type of extension
    alias: '', // unique alias for the extension
    elementName: '', // unique name of the custom element
    js: '', // path to the javascript resource
    meta: {
      // additional props for the extension type
    }
  }
};

extensionRegistry.register(extension);

Last updated