Lightning Web Runtime :: Services
This package contains core Addressable Services provided by LWR.
Importmap Service
The core Importmap Service is responsible for providing an addressable importmap resource (compliant with WICG import-map specification) in the format expected by the client loader.
Component Service
The core Component Service is responsible for providing compiled Lightning Web Components and modules that are made available in the moduleDir
as well as modules installed in node_modules as referenced by the lwc.config.json
.
App Bootstrap Service
The core App Bootstrap Service handles the specialized @webruntime/app
component, which is a virtual component generated by the service to handle the bootstrapping of your application component into the Custom Element Registry.
Getting Started
To install the @webruntime/services package:
npm install @webruntime/services
Configuration and Usage
To use a service defined in this package, add it to the services
configuration property in your application configuration file, webruntime-app.config.js
:
const { ComponentService, ImportMapService } = require('@webruntime/services');
module.exports = {
//...,
services: [ComponentService, ImportMapService],
//...,
}