Skip to content

Commit

Permalink
Experimental/chunk merge (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScriptedAlchemy authored Oct 25, 2020
1 parent 61241e9 commit 4c6cc0b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ This is a stable and viable workaround to leverage Module Federation [until this

**Once I PR webpack, this workaround will no longer be required.**

# Check out our book

| <a href="https://module-federation.myshopify.com/products/practical-module-federation" target="_blank"><img src="./docs/MFCover.png" alt='Practical Module Federation Book' width="95%"/></a> | <a href="https://module-federation.myshopify.com/products/practical-module-federation" target="_blank">We will be actively updating this book over the next year as we learn more about best practices and what issues people are running into with Module Federation, as well as with every release of Webpack as it moves towards a release candidate and release. So with your one purchase you are buying a whole year of updates.</a> |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |



## How to use it

1. Use `withModuleFederation` in your `next.config.js`
Expand All @@ -18,7 +25,7 @@ This is a stable and viable workaround to leverage Module Federation [until this
// next.config.js
const {
withModuleFederation,
} = require("@module-federation/nextjs-with-module-federation");
} = require("@module-federation/nexjs-mf");
const path = require("path");

module.exports = {
Expand Down Expand Up @@ -58,7 +65,7 @@ module.exports = {

```jsx
import Document, { Html, Head, Main, NextScript } from "next/document";
import { patchSharing } from "@module-federation/nextjs-with-module-federation";
import { patchSharing } from "@module-federation/nexjs-mf";

class MyDocument extends Document {
static async getInitialProps(ctx) {
Expand Down
Binary file added docs/MFCover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"public": true,
"name": "@module-federation/nextjs-mf",
"version": "0.0.1-alpha.0",
"version": "0.0.1-alpha.2",
"description": "Module Federation helper for NextJS",
"main": "index.js",
"repository": "https://github.com/module-federation/nexjs-mf",
Expand Down

0 comments on commit 4c6cc0b

Please sign in to comment.