@module-federation/nextjs-mf 5.2.1 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/lib/NextFederationPlugin.js +1 -481
- package/lib/NextFederationPlugin2.js +536 -0
- package/lib/_virtual/UrlNode.js +8 -0
- package/lib/_virtual/_commonjsHelpers.js +26 -0
- package/lib/_virtual/_tslib.js +101 -0
- package/lib/_virtual/helpers.js +7 -0
- package/lib/_virtual/nextPageMapLoader.js +7 -0
- package/lib/client/CombinedPages.d.ts +28 -0
- package/lib/client/CombinedPages.d.ts.map +1 -0
- package/lib/client/CombinedPages.js +60 -0
- package/lib/client/MFClient.d.ts +70 -0
- package/lib/client/MFClient.d.ts.map +1 -0
- package/lib/client/MFClient.js +197 -0
- package/lib/client/RemoteContainer.d.ts +58 -0
- package/lib/client/RemoteContainer.d.ts.map +1 -0
- package/lib/client/RemoteContainer.js +161 -0
- package/lib/client/RemotePages.d.ts +48 -0
- package/lib/client/RemotePages.d.ts.map +1 -0
- package/lib/client/RemotePages.js +168 -0
- package/lib/client/UrlNode.d.ts +18 -0
- package/lib/client/UrlNode.d.ts.map +1 -0
- package/lib/client/UrlNode.js +162 -0
- package/lib/client/helpers.d.ts +17 -0
- package/lib/client/helpers.d.ts.map +1 -0
- package/lib/client/helpers.js +108 -0
- package/lib/client/useMFClient.d.ts +25 -0
- package/lib/client/useMFClient.d.ts.map +1 -0
- package/lib/client/useMFClient.js +79 -0
- package/lib/client/useMFRemote.d.ts +17 -0
- package/lib/client/useMFRemote.d.ts.map +1 -0
- package/lib/client/useMFRemote.js +72 -0
- package/lib/loaders/UrlNode.js +215 -0
- package/lib/loaders/fixImageLoader.js +42 -8
- package/lib/loaders/helpers.js +21 -2
- package/lib/loaders/nextPageMapLoader.js +81 -17
- package/lib/loaders/patchNextClientPageLoader.js +53 -0
- package/lib/plugins/DevHmrFixInvalidPongPlugin.js +65 -0
- package/lib/utils.js +7 -3
- package/package.json +21 -4
- package/tsconfig.json +33 -0
package/package.json
CHANGED
|
@@ -1,33 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"public": true,
|
|
3
3
|
"name": "@module-federation/nextjs-mf",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.3.0",
|
|
5
5
|
"description": "Module Federation helper for NextJS",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
8
8
|
"repository": "https://github.com/module-federation/nextjs-mf",
|
|
9
9
|
"author": "Zack Jackson <zackary.l.jackson@gmail.com>",
|
|
10
|
+
"contributors": [
|
|
11
|
+
"Pavel Chertorogov, nodkz <pavel.chertorogov@gmail.com> (www.ps.kz)"
|
|
12
|
+
],
|
|
10
13
|
"license": "MIT",
|
|
11
14
|
"scripts": {
|
|
12
|
-
"demo": "
|
|
15
|
+
"demo": "sleep 3 && cd demo && yarn install && yarn dev",
|
|
16
|
+
"dev": "rm -rf lib && concurrently \"yarn sync-files --watch\" \"yarn compile --watch\" \"yarn demo\"",
|
|
13
17
|
"prettier": "prettier --write \"**/*.{js,json,md,ts,tsx}\"",
|
|
14
|
-
"
|
|
18
|
+
"sync-files": "cpx \"src/**/*.js\" lib/",
|
|
19
|
+
"compile": "rollup -c",
|
|
20
|
+
"build": "rm -rf lib && yarn sync-files && yarn compile",
|
|
15
21
|
"prepublishOnly": "yarn build"
|
|
16
22
|
},
|
|
17
23
|
"dependencies": {
|
|
18
24
|
"chalk": "^4.0.0",
|
|
25
|
+
"eventemitter3": "^4.0.7",
|
|
19
26
|
"fast-glob": "^3.2.11"
|
|
20
27
|
},
|
|
21
28
|
"devDependencies": {
|
|
22
29
|
"@rollup/plugin-commonjs": "^22.0.2",
|
|
23
30
|
"@rollup/plugin-multi-entry": "^4.1.0",
|
|
24
31
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
25
|
-
"
|
|
32
|
+
"@types/react": "^18.0.19",
|
|
33
|
+
"concurrently": "^7.3.0",
|
|
34
|
+
"cpx": "^1.5.0",
|
|
35
|
+
"next": "12.2.2",
|
|
26
36
|
"prettier": "2.3.2",
|
|
37
|
+
"react": "^18.2.0",
|
|
27
38
|
"rollup": "^2.78.1",
|
|
28
39
|
"rollup-obfuscator": "^3.0.1",
|
|
29
40
|
"rollup-plugin-node-builtins": "^2.1.2",
|
|
30
41
|
"rollup-plugin-node-globals": "^1.4.0",
|
|
42
|
+
"rollup-plugin-typescript2": "^0.33.0",
|
|
43
|
+
"tslib": "^2.4.0",
|
|
44
|
+
"typescript": "^4.8.2",
|
|
31
45
|
"webpack": "5.45.1"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"react": "^17.0.0 || ^18.0.0"
|
|
32
49
|
}
|
|
33
50
|
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"declarationMap": true,
|
|
6
|
+
"module": "ES2020",
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"downlevelIteration": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"strict": false,
|
|
13
|
+
"allowJs": true,
|
|
14
|
+
"strictBindCallApply": true,
|
|
15
|
+
"strictNullChecks": true,
|
|
16
|
+
"strictPropertyInitialization": false,
|
|
17
|
+
"suppressImplicitAnyIndexErrors": true,
|
|
18
|
+
"importHelpers": false,
|
|
19
|
+
"noImplicitAny": true,
|
|
20
|
+
"noImplicitReturns": true,
|
|
21
|
+
"noImplicitThis": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true,
|
|
23
|
+
"noUnusedParameters": false,
|
|
24
|
+
"noUnusedLocals": false,
|
|
25
|
+
"noEmitOnError": false,
|
|
26
|
+
"forceConsistentCasingInFileNames": true,
|
|
27
|
+
"skipLibCheck": true,
|
|
28
|
+
"lib": ["dom", "ESNext"],
|
|
29
|
+
"jsx": "react",
|
|
30
|
+
},
|
|
31
|
+
"exclude": ["node_modules"],
|
|
32
|
+
"include": ["src/client/**/*"]
|
|
33
|
+
}
|