For the managed package runtime, this page contains the Newport Loader ReadMe for each Vlocity release.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Vlocity Insurance and Health Winter '20 and CME Winter '20
The Newport Loader is a utility that exposes a single load function used to ensure the Newport CSS styles load in the <head> of the page.
This utility:
-
Ensures the styles are loaded only once across the page
-
Loads a custom version of Newport if the
newportZipUrlhas been configured in the org.
load(component)
You must always pass your component to the load function.
import { load } from `c/newportLoader`;
...
export default class MyComponent extends LightningElement {
connectedCallback() {
// It's recommended to add the styles into the page
// from your connectedCallback so they're not added
// to the page before they're needed, but available
// for when the component's `render` is called.
load(this)
.then(() => {
// newport styles added to page
});
}
}