How to use the ModuleFederationPlugin function from webpack

Find comprehensive JavaScript webpack.ModuleFederationPlugin code examples handpicked from public code repositorys.

46
47
48
49
50
51
52
53
54
55
      }
    }
  ]
},
plugins: [
  new ModuleFederationPlugin({
    name: 'Aegis',
    filename: 'remoteEntry.js',
    library: {
      name: 'Aegis',
fork icon16
star icon229
watch icon10

+ 3 other calls in file

0
1
2
3
4
5
6
7
8
9
const deps = require('../package.json').dependencies;
const { ModuleFederationPlugin } = require('webpack').container;
const { NodeFederationPlugin, StreamingTargetPlugin } = require('@module-federation/node');

module.exports = {
  client: new ModuleFederationPlugin({
    name: 'app1',
    filename: 'remoteEntry.js',
    remotes: {
      app2: 'app2@http://localhost:3001/static/remoteEntry.js',
fork icon0
star icon1
watch icon0