Skip to main content
Version: 3x

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

NameType
eagerboolean
singletonboolean

Defined in

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