-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwebpack.config.js
56 lines (53 loc) · 1.73 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
44
45
46
47
48
49
50
51
52
53
54
55
56
const { ModifyEntryPlugin } = require('@angular-architects/module-federation/src/utils/modify-entry-plugin')
const { share, withModuleFederationPlugin } = require('@angular-architects/module-federation/webpack')
const config = withModuleFederationPlugin({
name: 'product-store-ui',
filename: 'remoteEntry.js',
exposes: {
'./ProductStoreMgmtModule': 'src/app/product-store-remote.module.ts'
},
shared: share({
'@angular/core': { singleton: true, strictVersion: true, requiredVersion: 'auto' },
'@angular/forms': {
singleton: true,
strictVersion: true,
requiredVersion: 'auto',
includeSecondaries: true,
eager: false
},
'@angular/common': {
singleton: true,
strictVersion: true,
requiredVersion: 'auto',
includeSecondaries: {
skip: ['@angular/common/http/testing']
}
},
'@angular/common/http': {
singleton: true,
strictVersion: true,
requiredVersion: 'auto',
includeSecondaries: true
},
'@angular/router': { singleton: true, strictVersion: true, requiredVersion: 'auto', includeSecondaries: true },
rxjs: { singleton: true, strictVersion: true, requiredVersion: 'auto', includeSecondaries: true },
'@ngx-translate/core': { singleton: true, strictVersion: false, requiredVersion: '^14.0.0' },
'@onecx/portal-integration-angular': {
singleton: true,
requiredVersion: 'auto'
},
'@onecx/keycloak-auth': {
singleton: true,
requiredVersion: 'auto'
}
}),
sharedMappings: ['@onecx/portal-integration-angular']
})
config.devServer = {
allowedHosts: 'all'
}
const plugins = config.plugins.filter((plugin) => !(plugin instanceof ModifyEntryPlugin))
module.exports = {
...config,
plugins
}