-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
26 lines (23 loc) · 954 Bytes
/
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
const ModuleFederationPlugin = require('webpack').container.ModuleFederationPlugin;
module.exports = {
output: {
publicPath: 'auto',
},
plugins: [
new ModuleFederationPlugin({
name: 'AngularApp',
filename: 'remoteEntry.js',
remotes: {
react: 'react@http://localhost:4201/remoteEntry.js',
},
shared: {
'@angular/core': { singleton: true, strictVersion: true, requiredVersion: '18.2.11' },
'@angular/common': { singleton: true, strictVersion: true, requiredVersion: '18.2.11' },
'@angular/common/http': { singleton: true, strictVersion: true, requiredVersion: '18.2.11' },
'@angular/forms': { singleton: true, strictVersion: true, requiredVersion: '18.2.11' },
'react': { singleton: true, strictVersion: true, requiredVersion: '18.3.1' },
'react-dom': { singleton: true, strictVersion: true, requiredVersion: '18.3.1' },
},
}),
],
};