Skip to content

Commit 48e195e

Browse files
Merge pull request #22 from module-federation/readme_updates_rc1
readme updates
2 parents d279991 + 7a39b0e commit 48e195e

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

README.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
This plugin enables Module Federation on Next.js, both client-side and server-side.
44

5-
Module Federation on the server utilizes proprietary software, commonly known as "Software Streaming"
5+
Module Federation on the server utilizes proprietary software, commonly known as "Software Streaming".
66

77
This is the only _stable_ and continuously supported solution for Module Federation on Next.js.
88

99
It is also the only Federated SSR solution in existence that is supported by the creator of Module Federation.
1010

11-
#### This is currently in beta, and should be considered experimental till v1 is released.
11+
---
1212

1313
Software Streams have been tested extensively in other federated server applications, the underlying tech is proven to be reliable.
1414
However, software streams in Next.js is experimental, while in the beta phase.
@@ -24,6 +24,24 @@ This is because of our proximity to the Webpack Foundation & deep understanding
2424
- next ^12.x.x
2525
- SSR & CSR
2626

27+
---
28+
29+
## Contents
30+
31+
- [What's shared by default?](#whats-shared-by-default)
32+
- [Security](#important-note-about-security)
33+
- [Using the plugin](#using-the-plugin)
34+
- [Configuration Options](#configuration-options)
35+
- [Demo](#demo)
36+
- [Configuring Pages for SSR](#configuring-pages-for-ssr)
37+
- [Dynamic Routing between Applications](#dynamic-routing-between-applications)
38+
- [Exposing and Consuming Pages](#exposing-and-consuming-pages)
39+
- [Support and Maintenance](#support-and-maintenance)
40+
- [Contact](#contact)
41+
42+
---
43+
44+
2745
## What's shared by default?
2846

2947
Under the hood we share some next internals automatically
@@ -77,6 +95,8 @@ To provide a built-in protected route would require additional setup and complex
7795

7896
How assets are protected should be up to the consumer, who might use the CDN, NGIX, middleware to implement a restricted route.
7997

98+
---
99+
80100
## Using The Plugin
81101

82102
I now support the top-level API as well as the low-level API
@@ -112,7 +132,8 @@ const SampleComponent = dynamic(
112132

113133
Make sure you are using `mini-css-extract-plugin@2` - version 2 supports resolving assets through `publicPath:'auto'`
114134

115-
## Options
135+
---
136+
## Configuration Options
116137

117138
```js
118139
const remotes = (isServer) => {
@@ -154,7 +175,7 @@ withFederatedSidecar(
154175
}
155176
);
156177
```
157-
178+
---
158179
## Demo
159180

160181
You can see it in action here: https://github.com/module-federation/module-federation-examples/tree/master/nextjs-ssr
@@ -392,6 +413,7 @@ class MyDocument extends Document {
392413
export default MyDocument;
393414
```
394415
416+
---
395417
## Configuring Pages for SSR
396418
397419
To enable SSR for pages, you will need to create an async bootstrap layer for each page and the `_app` file.
@@ -465,6 +487,7 @@ export default Home;
465487

466488
```
467489
490+
---
468491
## Dynamic Routing between applications
469492
470493
To enable dynamic routes from another Next.js application, you will need to create a `[...slug].js` file in the `pages` directory as the async bootstrap file and one in the `async-pages` directory to handle the `createFederatedCatchAll` method.
@@ -487,6 +510,7 @@ export default createFederatedCatchAll(
487510
);
488511
```
489512
513+
---
490514
## Exposing and Consuming Pages
491515
492516
Just like exposing components and other modules, pages can also be exposed from one Next.js application and consumed in another.
@@ -557,6 +581,7 @@ export default Page;
557581
```
558582
Then add the remote to the `next.config.js` file.
559583
584+
---
560585
## Support and Maintenance
561586
562587
This software is maintained by the Module Federation Group.
@@ -582,6 +607,7 @@ All group members have full access to the organization and all its source code,
582607
583608
ScriptedAlchemy is the primary maintainer, not the only maintainer - this software is not dependent on "one person"
584609
610+
---
585611
## Reliability Testing
586612
587613
This software undergoes significant QA, SRE, Security Audits, Performance testing with our employer.
@@ -590,9 +616,11 @@ RUM data and other telemetry is heavily implemented and monitored closely.
590616
591617
Our software is backed with the resources of a multi-billion dollar corporation.
592618
619+
---
593620
## Contact
594621
595622
If you have any questions or need to report a bug
596623
<a href="https://twitter.com/ScriptedAlchemy"> Reach me on Twitter @ScriptedAlchemy</a>
597624
598625
Or join this discussion thread: https://github.com/module-federation/module-federation-examples/discussions/1482
626+

0 commit comments

Comments
 (0)