import { createApp, h } from 'vue';import {createInertiaApp, Link} from '@inertiajs/inertia-vue3';import { InertiaProgress } from '@inertiajs/progress'createInertiaApp({ resolve: name => { const pages = import.meta.glob('./Pages/**/*.vue', { eager: true }) return pages[`./Pages/${name}.vue`] }, setup({ el, App, props, plugin }) { createApp({ render: () => h(App, props) }) .use(plugin) .component("Link", Link) .mount(el) },});
Can we create this kind of structure in Svelte, like in Vue.js?
I want to use the component only by defining it in the main js file and calling it wherever I want without calling it over and over again