refactor: module federation
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
22
src/main.ts
22
src/main.ts
@@ -1,10 +1,6 @@
|
||||
import type { App as Vue } from 'vue'
|
||||
import routes from '@/routes'
|
||||
import integrations from '@/integrations'
|
||||
import { useCollectionsStore } from '@/stores/collectionsStore'
|
||||
import { useEntitiesStore } from '@/stores/entitiesStore'
|
||||
import { useProvidersStore } from '@/stores/providersStore'
|
||||
import { useServicesStore } from '@/stores/servicesStore'
|
||||
|
||||
/**
|
||||
* Mail Manager Module Boot Script
|
||||
@@ -23,21 +19,15 @@ export const css = ['__CSS_FILENAME_PLACEHOLDER__']
|
||||
// Export routes and integrations for module system
|
||||
export { routes, integrations }
|
||||
|
||||
// Export stores for external use if needed
|
||||
export { useCollectionsStore, useEntitiesStore, useProvidersStore, useServicesStore }
|
||||
// Export services, stores and models for external use
|
||||
export * from '@/services'
|
||||
export * from '@/stores'
|
||||
export * from '@/models'
|
||||
|
||||
// Export composables
|
||||
// Export composables for external use
|
||||
export { useMailSync } from '@/composables/useMailSync'
|
||||
|
||||
// Export services
|
||||
export { providerService, serviceService, collectionService, entityService } from '@/services'
|
||||
|
||||
// Export models
|
||||
export { CollectionObject, CollectionPropertiesObject } from '@/models/collection'
|
||||
export { MessageObject } from '@/models/message'
|
||||
export { EntityObject } from '@/models/entity'
|
||||
|
||||
// Export components
|
||||
// Export components for external use
|
||||
export { default as AddAccountDialog } from '@/components/AddAccountDialog.vue'
|
||||
export { default as EditAccountDialog } from '@/components/EditAccountDialog.vue'
|
||||
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
export { CollectionObject } from './collection';
|
||||
export { EntityObject } from './entity';
|
||||
export { ProviderObject } from './provider';
|
||||
export { ServiceObject } from './service';
|
||||
export {
|
||||
CollectionObject,
|
||||
CollectionPropertiesObject
|
||||
} from './collection';
|
||||
export { EntityObject } from './entity';
|
||||
export {
|
||||
MessageObject,
|
||||
MessagePartObject
|
||||
} from './message';
|
||||
export {
|
||||
Identity,
|
||||
IdentityNone,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Provides a centralized way to make API calls with envelope wrapping/unwrapping
|
||||
*/
|
||||
|
||||
import { createFetchWrapper } from '@KTXC/utils/helpers/fetch-wrapper-core';
|
||||
import { createFetchWrapper } from '@KTXC';
|
||||
import type { ApiRequest, ApiResponse } from '../types/common';
|
||||
|
||||
const fetchWrapper = createFetchWrapper();
|
||||
|
||||
@@ -41,13 +41,16 @@ export default defineConfig({
|
||||
},
|
||||
rollupOptions: {
|
||||
external: [
|
||||
'pinia',
|
||||
'vue',
|
||||
'vue-router',
|
||||
// Externalize shared utilities from core to avoid duplication
|
||||
/^@KTXC\/utils\//,
|
||||
'pinia',
|
||||
'@KTXC',
|
||||
],
|
||||
output: {
|
||||
paths: (id) => {
|
||||
if (id === '@KTXC') return '/js/ktxc.mjs'
|
||||
return id
|
||||
},
|
||||
assetFileNames: (assetInfo) => {
|
||||
if (assetInfo.name?.endsWith('.css')) {
|
||||
return 'mail_manager-[hash].css'
|
||||
|
||||
Reference in New Issue
Block a user