@modern-js/plugin-koa 2.63.5 → 2.63.7

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.
@@ -42,10 +42,12 @@ const koaPlugin = () => ({
42
42
  const runtimeModulePath = path.resolve(__dirname, "../runtime");
43
43
  return {
44
44
  config() {
45
+ var _modernConfig_bff;
45
46
  const appContext = useAppContext();
46
47
  bffExportsUtils = (0, import_utils.createRuntimeExportsUtils)(appContext.internalDirectory, "server");
48
+ const modernConfig = api.useResolvedConfigContext();
47
49
  const runtimePath = "@modern-js/plugin-koa/runtime";
48
- const alias = process.env.NODE_ENV === "production" ? runtimePath : require.resolve(runtimePath);
50
+ const alias = process.env.NODE_ENV === "production" || !!(modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig_bff = modernConfig.bff) === null || _modernConfig_bff === void 0 ? void 0 : _modernConfig_bff.enableCrossProjectInvocation) ? runtimePath : require.resolve(runtimePath);
49
51
  return {
50
52
  output: {
51
53
  externals: {
@@ -9,10 +9,12 @@ var koaPlugin = function() {
9
9
  var runtimeModulePath = path.resolve(__dirname, "../runtime");
10
10
  return {
11
11
  config: function config() {
12
+ var _modernConfig_bff;
12
13
  var appContext = useAppContext();
13
14
  bffExportsUtils = createRuntimeExportsUtils(appContext.internalDirectory, "server");
15
+ var modernConfig = api.useResolvedConfigContext();
14
16
  var runtimePath = "@modern-js/plugin-koa/runtime";
15
- var alias = process.env.NODE_ENV === "production" ? runtimePath : require.resolve(runtimePath);
17
+ var alias = process.env.NODE_ENV === "production" || !!(modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig_bff = modernConfig.bff) === null || _modernConfig_bff === void 0 ? void 0 : _modernConfig_bff.enableCrossProjectInvocation) ? runtimePath : require.resolve(runtimePath);
16
18
  return {
17
19
  output: {
18
20
  externals: {
@@ -8,10 +8,12 @@ const koaPlugin = () => ({
8
8
  const runtimeModulePath = path.resolve(__dirname, "../runtime");
9
9
  return {
10
10
  config() {
11
+ var _modernConfig_bff;
11
12
  const appContext = useAppContext();
12
13
  bffExportsUtils = createRuntimeExportsUtils(appContext.internalDirectory, "server");
14
+ const modernConfig = api.useResolvedConfigContext();
13
15
  const runtimePath = "@modern-js/plugin-koa/runtime";
14
- const alias = process.env.NODE_ENV === "production" ? runtimePath : require.resolve(runtimePath);
16
+ const alias = process.env.NODE_ENV === "production" || !!(modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig_bff = modernConfig.bff) === null || _modernConfig_bff === void 0 ? void 0 : _modernConfig_bff.enableCrossProjectInvocation) ? runtimePath : require.resolve(runtimePath);
15
17
  return {
16
18
  output: {
17
19
  externals: {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.63.5",
18
+ "version": "2.63.7",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/cli/index.d.ts",
21
21
  "main": "./dist/cjs/cli/index.js",
@@ -68,11 +68,11 @@
68
68
  "koa-body": "^4.2.0",
69
69
  "koa-router": "^10.0.0",
70
70
  "type-is": "^1.6.18",
71
- "@modern-js/bff-core": "2.63.5",
72
- "@modern-js/bff-runtime": "2.63.5",
73
- "@modern-js/server-core": "2.63.5",
74
- "@modern-js/types": "2.63.5",
75
- "@modern-js/utils": "2.63.5"
71
+ "@modern-js/bff-core": "2.63.7",
72
+ "@modern-js/bff-runtime": "2.63.7",
73
+ "@modern-js/server-core": "2.63.7",
74
+ "@modern-js/types": "2.63.7",
75
+ "@modern-js/utils": "2.63.7"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@types/jest": "^29",
@@ -86,10 +86,10 @@
86
86
  "supertest": "^6.1.6",
87
87
  "typescript": "^5",
88
88
  "zod": "^3.22.3",
89
- "@modern-js/app-tools": "2.63.5",
90
- "@modern-js/core": "2.63.5",
91
- "@scripts/build": "2.63.5",
92
- "@scripts/jest-config": "2.63.5"
89
+ "@modern-js/app-tools": "2.63.7",
90
+ "@modern-js/core": "2.63.7",
91
+ "@scripts/build": "2.63.7",
92
+ "@scripts/jest-config": "2.63.7"
93
93
  },
94
94
  "peerDependencies": {
95
95
  "koa": "^2.13.4"