@module-federation/nextjs-mf 5.8.0 → 5.8.3
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/CHANGELOG.md +46 -0
- package/package.json +3 -3
- package/utils/index.d.ts +1 -1
- package/utils/index.js +17 -5
- package/utils/index.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [5.8.3](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.8.2...nextjs-mf-5.8.3) (2022-10-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [5.8.2](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.8.1...nextjs-mf-5.8.2) (2022-10-06)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [5.8.1](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.8.0...nextjs-mf-5.8.1) (2022-10-06)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [5.8.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.7.2...nextjs-mf-5.8.0) (2022-10-06)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# [5.8.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.7.2...nextjs-mf-5.8.0) (2022-10-06)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [5.7.2](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.7.1...nextjs-mf-5.7.2) (2022-10-06)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [5.7.1](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.7.0...nextjs-mf-5.7.1) (2022-10-06)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* flush CSS chunks, cache bust remote entry on render ([#269](https://github.com/module-federation/nextjs-mf/issues/269)) ([85a216a](https://github.com/module-federation/nextjs-mf/commit/85a216a8fd34ae849630ff5b42bacb26c855a9ce))
|
|
35
|
+
* improve handling of offline remotes ([#263](https://github.com/module-federation/nextjs-mf/issues/263)) ([e0eb437](https://github.com/module-federation/nextjs-mf/commit/e0eb437bbc0259a8f263ededa505a397fa59b97b))
|
|
36
|
+
* **update versions:** bumping versions ([f72209a](https://github.com/module-federation/nextjs-mf/commit/f72209ae070fb50c9d317e764caf872facd4b887))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [5.7.1](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.7.0...nextjs-mf-5.7.1) (2022-10-06)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* flush CSS chunks, cache bust remote entry on render ([#269](https://github.com/module-federation/nextjs-mf/issues/269)) ([85a216a](https://github.com/module-federation/nextjs-mf/commit/85a216a8fd34ae849630ff5b42bacb26c855a9ce))
|
|
46
|
+
* improve handling of offline remotes ([#263](https://github.com/module-federation/nextjs-mf/issues/263)) ([e0eb437](https://github.com/module-federation/nextjs-mf/commit/e0eb437bbc0259a8f263ededa505a397fa59b97b))
|
|
47
|
+
* **update versions:** bumping versions ([f72209a](https://github.com/module-federation/nextjs-mf/commit/f72209ae070fb50c9d317e764caf872facd4b887))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
5
51
|
# [5.8.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-5.7.0...nextjs-mf-5.8.0) (2022-10-05)
|
|
6
52
|
|
|
7
53
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/nextjs-mf",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"fast-glob": "^3.2.11",
|
|
17
17
|
"webpack-sources": "^3.2.3",
|
|
18
18
|
"eventemitter3": "^4.0.7",
|
|
19
|
-
"@module-federation/node": "0.5.
|
|
20
|
-
"@module-federation/utilities": "0.
|
|
19
|
+
"@module-federation/node": "0.5.6",
|
|
20
|
+
"@module-federation/utilities": "0.1.3",
|
|
21
21
|
"@swc/core": "^1.3.3",
|
|
22
22
|
"tslib": "^2.3.0"
|
|
23
23
|
},
|
package/utils/index.d.ts
CHANGED
package/utils/index.js
CHANGED
|
@@ -23,11 +23,23 @@ exports.revalidate = revalidate;
|
|
|
23
23
|
//@ts-ignore
|
|
24
24
|
const FlushedChunks = ({ chunks }) => {
|
|
25
25
|
//@ts-ignore
|
|
26
|
-
const scripts = chunks.filter((c) => c.endsWith(".js")).map((chunk) =>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
const scripts = chunks.filter((c) => c.endsWith(".js")).map((chunk) => {
|
|
27
|
+
if (!chunk.includes('?') && chunk.includes('remoteEntry')) {
|
|
28
|
+
chunk = chunk + '?t=' + Date.now();
|
|
29
|
+
}
|
|
30
|
+
return React.createElement("script", {
|
|
31
|
+
src: chunk,
|
|
32
|
+
async: true
|
|
33
|
+
}, null);
|
|
34
|
+
});
|
|
35
|
+
//@ts-ignore
|
|
36
|
+
const css = chunks.filter((c) => c.endsWith(".css")).map((chunk) => {
|
|
37
|
+
return React.createElement("link", {
|
|
38
|
+
href: chunk,
|
|
39
|
+
rel: "stylesheet"
|
|
40
|
+
}, null);
|
|
41
|
+
});
|
|
42
|
+
return [css, scripts];
|
|
31
43
|
};
|
|
32
44
|
exports.FlushedChunks = FlushedChunks;
|
|
33
45
|
exports.FlushedChunks.defaultProps = {
|
package/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/utils/index.ts"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,0DAAiF;AAAxE,gHAAA,mBAAmB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC1C,aAAa;AACb,uDAA0D;AAAlD,oGAAA,WAAW,OAAA;AAEZ,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,IAAG,OAAO,MAAM,KAAK,WAAW,EAAE;QAChC,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAC9D,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;KAC/B;IACD,aAAa;IACb,OAAO,0DAAO,+BAA+B,IAAE,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5D,OAAO,KAAK,CAAC,UAAU,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AATY,QAAA,UAAU,cAStB;AAED,YAAY;AACL,MAAM,aAAa,GAAG,CAAC,EAAE,MAAM,EAAE,EAAC,EAAE;IACzC,YAAY;IACZ,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAC,EAAE,CAAA,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/utils/index.ts"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,0DAAiF;AAAxE,gHAAA,mBAAmB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAC1C,aAAa;AACb,uDAA0D;AAAlD,oGAAA,WAAW,OAAA;AAEZ,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,IAAG,OAAO,MAAM,KAAK,WAAW,EAAE;QAChC,OAAO,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;Q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