0.15.0 • Published 4 months ago

@module-federation/rsbuild-plugin v0.15.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@module-federation/rsbuild-plugin

Example

npm install @module-federation/rsbuild-plugin -D
npm install @module-federation/enhanced

Rsbuild App

import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
import { defineConfig } from '@rsbuild/core';
import { pluginReact } from '@rsbuild/plugin-react';

export default defineConfig({
  server: {
    port: 2000,
  },
  plugins: [
    pluginReact(),
    pluginModuleFederation({
      name: 'federation_consumer',
      remotes: {
        remote1: 'remote1@http://localhost:2001/mf-manifest.json',
      },
      shared: ['react', 'react-dom'],
    }),
  ],
});

Rslib Module

import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
import { defineConfig } from '@rslib/core';

export default defineConfig({
  lib: [
    // ...
    {
      format: 'mf',
      output: {
        distPath: {
          root: './dist/mf',
        },
        assetPrefix: 'http://localhost:3001/mf',
      },
      plugins: [
        // ...
        pluginModuleFederation({
          name: 'rslib_provider',
          exposes: {
            '.': './src/index.tsx',
          },
          shared: {
            react: {
              singleton: true,
            },
            'react-dom': {
              singleton: true,
            },
          },
        }),
      ],
    },
  ],
});
0.8.9

9 months ago

0.8.8

10 months ago

0.8.5

10 months ago

0.8.4

10 months ago

0.8.7

10 months ago

0.8.6

10 months ago

0.7.2

11 months ago

0.7.1

12 months ago

0.7.3

11 months ago

0.7.0

12 months ago

0.10.0

8 months ago

0.8.1

11 months ago

0.8.0

11 months ago

0.8.3

10 months ago

0.8.2

10 months ago

0.15.0

5 months ago

0.6.16

12 months ago

0.7.6

11 months ago

0.7.5

11 months ago

0.7.7

11 months ago

0.13.0

6 months ago

0.13.1

6 months ago

0.14.0

5 months ago

0.14.1

5 months ago

0.14.2

5 months ago

0.14.3

5 months ago

0.11.0

7 months ago

0.11.1

7 months ago

0.11.2

7 months ago

0.11.3

7 months ago

0.11.4

7 months ago

0.9.0

8 months ago

0.9.1

8 months ago

0.12.0

6 months ago

0.8.12

8 months ago

0.8.11

8 months ago

0.8.10

9 months ago

0.6.15

12 months ago

0.6.14

12 months ago

0.6.13

12 months ago

0.6.12

12 months ago

0.0.2

1 year ago