I have a main app using Nuxt2 and Vue. And I try to add a microfrontend using single-spa library. The subapp rendered in the main app without any errors but it is not displaying. I also use vue-i18n. Asynchronous functions in plugins section which are required for localization cause display issue in subapp. If I comment asynchronous functions there is no issue in the subapp, but it chusches localization. Without single-spa asynchronous functions in plugins section work well.
localization.js in plugins folder
export default async function boot(context) {
await context.store.dispatch('auth/getUser');
await Promise.all([
context.store.dispatch('ui/updateDefaultLanguage'), //some asynchronous functions cause issue in subapp
context.store.dispatch('auth/getConfiguration'),
]);
}
nuxt.config.js
plugins: [
//...
'plugins/localization.js',
'plugins/root-application.client.js',
],
Link to sandbox which I have used as an example of initial project.