Reputation: 1
Both shell app and remote app has angular_core package in the build bundle, even after adding them in shared: {} webpack config. Is it expected?
Shell app webpack config
'@angular/core': {
singleton: true,
strictVersion: true,
requiredVersion: 'auto'
},
'@angular/common': {
singleton: true,
strictVersion: true,
requiredVersion: 'auto'
},
'@angular/router': {
singleton: true,
strictVersion: true,
requiredVersion: 'auto'
},
...shareAll({
singleton: true,
strictVersion: true,
requiredVersion: 'auto'
}),
'ui-components': {
singleton: true,
strictVersion: true,
requiredVersion: '>=0.0.1 <=1.0.0',
},
},
sharedMappings: ['shared-components']
Remote app webpack config
"@angular/core": {
singleton: true,
strictVersion: true,
requiredVersion: 'auto'
},
"@angular/common": {
singleton: true,
strictVersion: true,
requiredVersion: 'auto'
},
"@angular/router": {
singleton: true,
strictVersion: true,
requiredVersion: 'auto'
},
"@angular/common/http": {
singleton: true,
strictVersion: true,
requiredVersion: 'auto'
},
...shareAll({
singleton: true,
strictVersion: true,
requiredVersion: 'auto'
}),
'ui-components': {
singleton: true,
strictVersion: true,
requiredVersion: '>=0.0.1 <=1.0.0',
}
},
sharedMappings: ['shared-components']
I was expecting the shared packages should be bundled only once in shell app but was included in remote's bundle as well which causes duplicate bundles
Upvotes: 0
Views: 66