lazy load imaging repo

This commit is contained in:
Mads Rasmussen
2024-07-03 20:57:34 +02:00
parent 4b410c456a
commit a48b4188b7
5 changed files with 11 additions and 10 deletions

View File

@@ -0,0 +1 @@
export const UMB_IMAGING_REPOSITORY_ALIAS = 'Umb.Repository.Imaging';

View File

@@ -40,3 +40,5 @@ export class UmbImagingRepository extends UmbControllerBase implements UmbApi {
return await this.requestResizedItems(uniques, imagingModel);
}
}
export { UmbImagingRepository as api };

View File

@@ -1,2 +1,2 @@
export { UmbImagingRepository } from './imaging.repository.js';
export { UMB_IMAGING_REPOSITORY_ALIAS } from './manifests.js';
export { UMB_IMAGING_REPOSITORY_ALIAS } from './constants.js';

View File

@@ -1,13 +1,11 @@
import { UmbImagingRepository } from './imaging.repository.js';
import { UMB_IMAGING_REPOSITORY_ALIAS } from './constants.js';
import type { ManifestRepository, ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const UMB_IMAGING_REPOSITORY_ALIAS = 'Umb.Repository.Imaging';
const repository: ManifestRepository = {
type: 'repository',
alias: UMB_IMAGING_REPOSITORY_ALIAS,
name: 'Imaging Repository',
api: UmbImagingRepository,
api: () => import('./imaging.repository.js'),
};
export const manifests: Array<ManifestTypes> = [repository];

View File

@@ -11,11 +11,11 @@ export default defineConfig({
...getDefaultConfig({
dist,
entry: {
'entry-point': 'entry-point.ts',
'imaging/index': 'imaging/index.ts',
'media-type/index': 'media-type/index.ts',
'media/index': 'media/index.ts',
'umbraco-package': 'umbraco-package.ts',
//'entry-point': 'entry-point.ts',
//'imaging/index': 'imaging/index.ts',
//'media-type/index': 'media-type/index.ts',
//'media/index': 'media/index.ts',
//'umbraco-package': 'umbraco-package.ts',
manifests: 'manifests.ts',
},
}),