Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/content/plugins/module-federation-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ contributors:
- chenxsan
- burhanuday
- christian24
- KhaledTaymour
related:
- title: Module Federation
url: /concepts/module-federation/
Expand Down Expand Up @@ -74,7 +75,7 @@ format(new Date(2014, 1, 11), 'MM/dd/yyyy');
```

and webpack will automatically share `date-fns` between all your federated modules that define `date-fns` as a shared library.
However, if you want to access something that is not located at the root level of the package, for example `date-fns/locale/en-GB/index.js`, you need need to append `/` to the package name in your `shared` configuration:
However, if you want to access something that is not located at the root level of the package, for example `date-fns/locale/en-GB/index.js`, you need to append `/` to the package name in your `shared` configuration:

```js
const { ModuleFederationPlugin } = require('webpack').container;
Expand Down