Luigi Container is a web component that can be used to render a Luigi micro frontend without the need of a Luigi Core application. Luigi Container can work with any framework that supports HTML. It can be an easy solution for integrating micro frontends inside already existing apps without the cost of refactoring. You can also have multiple micro frontends on the same page.
@luigi-project/containernpm install @luigi-project/container
import '@luigi-project/container';
{
...some other settings,
"html.customData": [
"PATH/TO/node_modules/@luigi-project/container/vscode.html-custom-data.json"
]
}
After importing the package, you can use the Luigi container anywhere in your application. You can configure it just like a regular Luigi application, for example by using parameters such as viewURL (which specifies the URL of the micro frontend):
<luigi-container
viewURL="https://www.example-microfronted.com"
webcomponent="false"
label="my label"
context='{"label": "Calendar"}'>
</luigi-container>
git clone git@github.com:SAP/luigi.git
cd luigi/container
npm install
npm run build
npm run start-examples
The app should be available at http://localhost:2222 in your browser.
To make use of all of the container based Luigi functionalities you can take a further look at the API reference:
You can follow the Luigi Container UI5 tutorial to learn how to: