├── .gitignore ├── home ├── public │ ├── favicon.ico │ └── zeit.svg ├── components │ └── Header.jsx ├── package.json ├── .gitignore ├── pages │ ├── _document.js │ └── index.js ├── next.config.js └── README.md └── pdp ├── public ├── favicon.ico └── zeit.svg ├── package.json ├── .gitignore ├── pages ├── _document.js └── index.js ├── next.config.js └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | out 3 | -------------------------------------------------------------------------------- /home/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jherr/wp5-nextjs-10/HEAD/home/public/favicon.ico -------------------------------------------------------------------------------- /pdp/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jherr/wp5-nextjs-10/HEAD/pdp/public/favicon.ico -------------------------------------------------------------------------------- /home/components/Header.jsx: -------------------------------------------------------------------------------- 1 | const Header = () => ( 2 |
10 |

Header

11 |
12 | ); 13 | 14 | export default Header; 15 | -------------------------------------------------------------------------------- /home/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "home", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start" 9 | }, 10 | "resolutions": { 11 | "webpack": "5.1.3", 12 | "next": "9.5.5" 13 | }, 14 | "dependencies": { 15 | "@module-federation/nextjs-mf": "0.0.1-beta.4", 16 | "next": "^9.5.6-canary.0", 17 | "react": "17.0.1", 18 | "react-dom": "17.0.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /pdp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pdp", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev -p 3001", 7 | "build": "next build", 8 | "start": "next start" 9 | }, 10 | "resolutions": { 11 | "webpack": "5.1.3", 12 | "next": "9.5.5" 13 | }, 14 | "dependencies": { 15 | "@module-federation/nextjs-mf": "0.0.1-beta.4", 16 | "next": "^9.5.6-canary.0", 17 | "react": "17.0.1", 18 | "react-dom": "17.0.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /home/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | 21 | # debug 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # local env files 27 | .env.local 28 | .env.development.local 29 | .env.test.local 30 | .env.production.local 31 | -------------------------------------------------------------------------------- /pdp/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | 21 | # debug 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # local env files 27 | .env.local 28 | .env.development.local 29 | .env.test.local 30 | .env.production.local 31 | -------------------------------------------------------------------------------- /home/pages/_document.js: -------------------------------------------------------------------------------- 1 | import Document, { Html, Head, Main, NextScript } from "next/document"; 2 | import { patchSharing } from "@module-federation/nextjs-mf"; 3 | 4 | class MyDocument extends Document { 5 | static async getInitialProps(ctx) { 6 | const initialProps = await Document.getInitialProps(ctx); 7 | return { ...initialProps }; 8 | } 9 | 10 | render() { 11 | return ( 12 | 13 | {patchSharing()} 14 | 15 | 16 |
17 | 18 | 19 | 20 | ); 21 | } 22 | } 23 | 24 | export default MyDocument; 25 | -------------------------------------------------------------------------------- /pdp/pages/_document.js: -------------------------------------------------------------------------------- 1 | import Document, { Html, Head, Main, NextScript } from "next/document"; 2 | import { patchSharing } from "@module-federation/nextjs-mf"; 3 | 4 | class MyDocument extends Document { 5 | static async getInitialProps(ctx) { 6 | const initialProps = await Document.getInitialProps(ctx); 7 | return { ...initialProps }; 8 | } 9 | 10 | render() { 11 | return ( 12 | 13 | {patchSharing()} 14 |