First of all a great framework for SSR based MFEs . I was trying out the Ara / Svelte (Micro App1) / Vue (Micro App 2) / Nuxt JS (Appshell) as described in https://ara-framework
As you describe in the comments, using the NovaMount
event is the best approach so far. Unfortunately, there's nothing out of the box to do it without explicitly define the bundle URLs yet.
However, we plan to add a new feature to Nova Proxy to make that easier.
In the getComponent
helper, we can use the returnMeta
property from the second parameter to return the client script URL in the Hypernova response.
hypernova({
getComponent (name, { returnMeta }) {
returnMeta.src = 'http://localhost:3000/public/client.js'
}
})
We get something like this in the Hypernova response.
{
"success": true,
"error": null,
"results": {
"example": {
"name": "Example",
"HTML": "...",
"meta": {
"src": "http://localhost:3000/public/client.js"
},
...
}
}
}
We plan to inject that client URL in Nova Proxy when including the Nova views as well.
I created this Github issue where you can follow-up on the feature progress. https://github.com/ara-framework/nova-proxy/issues/10