Add resources defined in config and a bundle of the site's own screens

This commit is contained in:
Matthijs Iriks committed 2026-12-04 05:26:37 +01:00
1 parent 37a29d9195
commit 3345797141
35 files changed
+905 -19

No files matched your search

+27 -6
View File
@@ -1,10 +1,31 @@
import { createApp } from 'vue';
import * as Vue from 'vue';
import App from './App.vue';
import { boot } from './api';
import { setLocale } from './i18n';
import { start } from './state';
import { api, boot } from './api';
import FormFields from './components/FormFields.vue';
import Icon from './components/Icon.vue';
import Link from './components/Link.vue';
import MediaPicker from './components/MediaPicker.vue';
import { setLocale, t } from './i18n';
import { flash, navigate, register, start } from './state';
import './style.css';
setLocale(boot.locale);
createApp(App).mount('#manager');
start();
// What a site's own bundle (config `manager.extensions`) may use. Its `import 'vue'` is mapped to this very Vue (see
// resources/dist/vue.js), so its components share the reactivity of the screens.
(window as any).IriksManager = { Vue, boot, api, t, flash, navigate, register, components: { Link, FormFields, Icon, MediaPicker } };
async function run(): Promise<void> {
for (const url of boot.extensions ?? []) {
try {
await import(/* @vite-ignore */ url);
} catch (error) {
console.error(`Manager extension ${url} did not load`, error);
}
}
Vue.createApp(App).mount('#manager');
start();
}
void run();