-
Notifications
You must be signed in to change notification settings - Fork 7
/
webpack.config.js
43 lines (40 loc) · 2.5 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const { ModifyEntryPlugin } = require('@angular-architects/module-federation/src/utils/modify-entry-plugin')
const { share, withModuleFederationPlugin } = require('@angular-architects/module-federation/webpack')
const webpackConfig = {
...withModuleFederationPlugin({
shared: share({
'@angular/core': { requiredVersion: 'auto', includeSecondaries: true, singleton: true },
'@angular/common': {
requiredVersion: 'auto',
includeSecondaries: { skip: ['@angular/common/http/testing'] },
singleton: true
},
'@angular/common/http': { requiredVersion: 'auto', includeSecondaries: true, singleton: true },
'@angular/elements': { requiredVersion: 'auto', includeSecondaries: true, singleton: true },
'@angular/forms': { requiredVersion: 'auto', includeSecondaries: true, singleton: true },
'@angular/platform-browser': { requiredVersion: 'auto', includeSecondaries: true },
'@angular/router': { requiredVersion: 'auto', includeSecondaries: true, singleton: true },
'@angular-architects/module-federation-tools': { requiredVersion: 'auto', includeSecondaries: true },
'@ngx-translate/core': { requiredVersion: 'auto' },
rxjs: { requiredVersion: 'auto', includeSecondaries: true },
primeng: { requiredVersion: 'auto', includeSecondaries: true },
'@onecx/accelerator': { requiredVersion: 'auto', includeSecondaries: true },
'@onecx/angular-accelerator': { requiredVersion: 'auto', includeSecondaries: true },
'@onecx/angular-auth': { requiredVersion: 'auto', includeSecondaries: true },
'@onecx/angular-integration-interface': { requiredVersion: 'auto', includeSecondaries: true },
'@onecx/angular-remote-components': { requiredVersion: 'auto', includeSecondaries: true },
'@onecx/angular-webcomponents': { requiredVersion: 'auto', includeSecondaries: true },
'@onecx/integration-interface': { requiredVersion: 'auto', includeSecondaries: true },
'@onecx/keycloak-auth': { requiredVersion: 'auto', includeSecondaries: true },
'@onecx/portal-integration-angular': { requiredVersion: 'auto', includeSecondaries: true },
'@onecx/portal-layout-styles': { requiredVersion: 'auto', includeSecondaries: true },
'@onecx/shell-core': { requiredVersion: 'auto', includeSecondaries: true }
}),
sharedMappings: ['@onecx/portal-integration-angular']
})
}
const plugins = webpackConfig.plugins.filter((plugin) => !(plugin instanceof ModifyEntryPlugin))
module.exports = {
...webpackConfig,
plugins
}