Variable: SHARED_REACT

Federated.SHARED_REACT

Const SHARED_REACT: Object

Predefined options for shared react dependency.

example Basic example.

import * as Repack from '@callstack/repack';

new Repack.plugins.ModuleFederationPlugin({
  // ...
  shared: {
    react: Repack.Federated.SHARED_REACT,
  }
});

example Example with spread and additional options.

import * as Repack from '@callstack/repack';

new Repack.plugins.ModuleFederationPlugin({
  // ...
  shared: {
    react: {
      ...Repack.Federated.SHARED_REACT,
      // additional options
    }
  }
});

Type declaration

Name Type
eager boolean
singleton boolean

Defined in

packages/repack/src/webpack/federated.ts:38