`
}
};
/* --> */
const i18n = VueI18n.createI18n();
const options = {
moduleCache: { vue: Vue },
getFile: url => config.files[url] ?? (() => { throw new Error('404 ' + url) })(),
addStyle: (textContent) => {
const style = Object.assign(document.createElement('style'), { textContent });
const ref = document.head.getElementsByTagName('style')[0] || null;
document.head.insertBefore(style, ref);
},
customBlockHandler(block, filename, options) {
if ( block.type !== 'i18n' )
return
const messages = JSON.parse(block.content);
for ( let locale in messages )
i18n.global.mergeLocaleMessage(locale, messages[locale]);
}
}
const app = Vue.createApp(Vue.defineAsyncComponent(() => window['vue3-sfc-loader'].loadModule('/component.vue', options)));
app.use(i18n);
app.mount(document.body);