@module-federation/modern-js 0.0.0-next-20240718035334 → 0.0.0-next-20240723033044

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.
@@ -110,9 +110,8 @@ const moduleFederationSSRPlugin = (userConfig) => ({
110
110
  return;
111
111
  }
112
112
  try {
113
- var _req_url, _req_url1, _req_url2;
114
- const SERVER_PREFIX = `/${import_constant.MODERN_JS_SERVER_DIR}`;
115
- if (((_req_url = req.url) === null || _req_url === void 0 ? void 0 : _req_url.startsWith(SERVER_PREFIX)) || ((_req_url1 = req.url) === null || _req_url1 === void 0 ? void 0 : _req_url1.includes(".json")) && !((_req_url2 = req.url) === null || _req_url2 === void 0 ? void 0 : _req_url2.includes("hot-update"))) {
113
+ var _req_url, _req_url1;
114
+ if (((_req_url = req.url) === null || _req_url === void 0 ? void 0 : _req_url.includes(".json")) && !((_req_url1 = req.url) === null || _req_url1 === void 0 ? void 0 : _req_url1.includes("hot-update"))) {
116
115
  const filepath = import_path.default.join(process.cwd(), `dist${req.url}`);
117
116
  import_utils.fs.statSync(filepath);
118
117
  res.setHeader("Access-Control-Allow-Origin", "*");
@@ -5,7 +5,7 @@ import { fs } from "@modern-js/utils";
5
5
  import { ModuleFederationPlugin } from "@module-federation/enhanced";
6
6
  import { StreamingTargetPlugin, EntryChunkTrackerPlugin } from "@module-federation/node";
7
7
  import { updateStatsAndManifest } from "./manifest";
8
- import { MODERN_JS_SERVER_DIR, PLUGIN_IDENTIFIER } from "../constant";
8
+ import { PLUGIN_IDENTIFIER } from "../constant";
9
9
  import { isDev } from "./constant";
10
10
  function setEnv() {
11
11
  process.env["MF_DISABLE_EMIT_STATS"] = "true";
@@ -92,9 +92,8 @@ var moduleFederationSSRPlugin = function(userConfig) {
92
92
  return;
93
93
  }
94
94
  try {
95
- var _req_url, _req_url1, _req_url2;
96
- var SERVER_PREFIX = "/".concat(MODERN_JS_SERVER_DIR);
97
- if (((_req_url = req.url) === null || _req_url === void 0 ? void 0 : _req_url.startsWith(SERVER_PREFIX)) || ((_req_url1 = req.url) === null || _req_url1 === void 0 ? void 0 : _req_url1.includes(".json")) && !((_req_url2 = req.url) === null || _req_url2 === void 0 ? void 0 : _req_url2.includes("hot-update"))) {
95
+ var _req_url, _req_url1;
96
+ if (((_req_url = req.url) === null || _req_url === void 0 ? void 0 : _req_url.includes(".json")) && !((_req_url1 = req.url) === null || _req_url1 === void 0 ? void 0 : _req_url1.includes("hot-update"))) {
98
97
  var filepath = path.join(process.cwd(), "dist".concat(req.url));
99
98
  fs.statSync(filepath);
100
99
  res.setHeader("Access-Control-Allow-Origin", "*");
@@ -3,7 +3,7 @@ import { fs } from "@modern-js/utils";
3
3
  import { ModuleFederationPlugin } from "@module-federation/enhanced";
4
4
  import { StreamingTargetPlugin, EntryChunkTrackerPlugin } from "@module-federation/node";
5
5
  import { updateStatsAndManifest } from "./manifest";
6
- import { MODERN_JS_SERVER_DIR, PLUGIN_IDENTIFIER } from "../constant";
6
+ import { PLUGIN_IDENTIFIER } from "../constant";
7
7
  import { isDev } from "./constant";
8
8
  function setEnv() {
9
9
  process.env["MF_DISABLE_EMIT_STATS"] = "true";
@@ -75,9 +75,8 @@ const moduleFederationSSRPlugin = (userConfig) => ({
75
75
  return;
76
76
  }
77
77
  try {
78
- var _req_url, _req_url1, _req_url2;
79
- const SERVER_PREFIX = `/${MODERN_JS_SERVER_DIR}`;
80
- if (((_req_url = req.url) === null || _req_url === void 0 ? void 0 : _req_url.startsWith(SERVER_PREFIX)) || ((_req_url1 = req.url) === null || _req_url1 === void 0 ? void 0 : _req_url1.includes(".json")) && !((_req_url2 = req.url) === null || _req_url2 === void 0 ? void 0 : _req_url2.includes("hot-update"))) {
78
+ var _req_url, _req_url1;
79
+ if (((_req_url = req.url) === null || _req_url === void 0 ? void 0 : _req_url.includes(".json")) && !((_req_url1 = req.url) === null || _req_url1 === void 0 ? void 0 : _req_url1.includes("hot-update"))) {
81
80
  const filepath = path.join(process.cwd(), `dist${req.url}`);
82
81
  fs.statSync(filepath);
83
82
  res.setHeader("Access-Control-Allow-Origin", "*");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/modern-js",
3
- "version": "0.0.0-next-20240718035334",
3
+ "version": "0.0.0-next-20240723033044",
4
4
  "files": [
5
5
  "dist/",
6
6
  "types.d.ts",
@@ -61,18 +61,18 @@
61
61
  "node-fetch": "~3.3.0",
62
62
  "react-error-boundary": "4.0.13",
63
63
  "hoist-non-react-statics": "3.3.2",
64
- "@module-federation/sdk": "0.0.0-next-20240718035334",
65
- "@module-federation/enhanced": "0.0.0-next-20240718035334",
66
- "@module-federation/node": "0.0.0-next-20240718035334"
64
+ "@module-federation/sdk": "0.0.0-next-20240723033044",
65
+ "@module-federation/enhanced": "0.0.0-next-20240723033044",
66
+ "@module-federation/node": "0.0.0-next-20240723033044"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/hoist-non-react-statics": "3.3.2",
70
- "@modern-js/app-tools": "^2.55.0",
71
- "@modern-js/core": "^2.55.0",
72
- "@modern-js/runtime": "^2.55.0",
73
- "@modern-js/module-tools": "^2.55.0",
74
- "@modern-js/tsconfig": "^2.55.0",
75
- "@module-federation/manifest": "0.0.0-next-20240718035334"
70
+ "@modern-js/app-tools": "2.56.1",
71
+ "@modern-js/core": "2.56.1",
72
+ "@modern-js/runtime": "2.56.1",
73
+ "@modern-js/module-tools": "2.56.1",
74
+ "@modern-js/tsconfig": "2.56.1",
75
+ "@module-federation/manifest": "0.0.0-next-20240723033044"
76
76
  },
77
77
  "peerDependencies": {
78
78
  "react": ">=17",