mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 04:21:06 +08:00
Use new module federation configuration
This commit is contained in:
parent
093fba6f5a
commit
2bb079739f
5 changed files with 28 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
"extends": "../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../out-tsc/app",
|
||||
"target": "es2022",
|
||||
"types": []
|
||||
},
|
||||
"files": [
|
||||
|
|
|
@ -8,6 +8,9 @@ module.exports = {
|
|||
runtimeChunk: false,
|
||||
minimize: false
|
||||
},
|
||||
experiments: {
|
||||
outputModule: true
|
||||
},
|
||||
plugins: [
|
||||
new ModuleFederationPlugin({
|
||||
|
||||
|
|
|
@ -1,12 +1,29 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import {UKPhoneEditFieldComponent} from './fields/uk-phone/templates/edit/uk-phone.component';
|
||||
import {UkPhoneEditFieldModule} from './fields/uk-phone/templates/edit/uk-phone.module';
|
||||
import {FieldRegistry} from 'core';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
imports: [],
|
||||
imports: [
|
||||
CommonModule,
|
||||
HttpClientModule,
|
||||
UkPhoneEditFieldModule
|
||||
],
|
||||
providers: []
|
||||
})
|
||||
export class ExtensionModule {
|
||||
constructor() {
|
||||
constructor(
|
||||
protected fieldRegistry: FieldRegistry
|
||||
) {
|
||||
// Override the edit mode phone field component for all modules
|
||||
fieldRegistry.register('default', 'phone', 'edit', UKPhoneEditFieldComponent);
|
||||
|
||||
// Override the edit mode phone field component just for accounts
|
||||
// fieldRegistry.register('accounts', 'phone', 'edit', UKPhoneEditFieldComponent);
|
||||
}
|
||||
|
||||
init(): void {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"extends": "../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/app",
|
||||
"target": "es2022",
|
||||
"types": []
|
||||
},
|
||||
"files": [
|
||||
|
|
|
@ -8,14 +8,16 @@ module.exports = {
|
|||
optimization: {
|
||||
runtimeChunk: false
|
||||
},
|
||||
experiments: {
|
||||
outputModule: true
|
||||
},
|
||||
plugins: [
|
||||
new ModuleFederationPlugin({
|
||||
|
||||
name: 'defaultExt',
|
||||
filename: 'remoteEntry.js',
|
||||
library: {
|
||||
type: 'window',
|
||||
name: 'defaultExt',
|
||||
type: "module",
|
||||
},
|
||||
exposes: {
|
||||
'./Module': './extensions/defaultExt/app/src/extension.module.ts'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue