@modern-js/plugin-ssg 2.53.0 → 2.54.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/dist/cjs/server/index.js
CHANGED
|
@@ -46,7 +46,7 @@ const createServer = (api, ssgRoutes, pageRoutes, apiRoutes, options, appDirecto
|
|
|
46
46
|
silent: true
|
|
47
47
|
});
|
|
48
48
|
const appContext = api.useAppContext();
|
|
49
|
-
const plugins = appContext.
|
|
49
|
+
const plugins = appContext.serverPlugins;
|
|
50
50
|
cp.send(JSON.stringify({
|
|
51
51
|
options,
|
|
52
52
|
renderRoutes: ssgRoutes,
|
|
@@ -42,8 +42,8 @@ process.on("message", async (chunk) => {
|
|
|
42
42
|
config: options,
|
|
43
43
|
appContext,
|
|
44
44
|
routes,
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
plugins: (0, import_prod_server.loadServerPlugins)(plugins, appContext.appDirectory || distDirectory),
|
|
46
|
+
staticGenerate: true
|
|
47
47
|
};
|
|
48
48
|
nodeServer = await (0, import_prod_server.createProdServer)(serverOptions);
|
|
49
49
|
nodeServer.listen(port, async () => {
|
package/dist/esm/server/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var createServer = function(api, ssgRoutes, pageRoutes, apiRoutes, options, appD
|
|
|
16
16
|
silent: true
|
|
17
17
|
});
|
|
18
18
|
var appContext = api.useAppContext();
|
|
19
|
-
var plugins = appContext.
|
|
19
|
+
var plugins = appContext.serverPlugins;
|
|
20
20
|
cp.send(JSON.stringify({
|
|
21
21
|
options,
|
|
22
22
|
renderRoutes: ssgRoutes,
|
|
@@ -3,7 +3,7 @@ import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
|
|
|
3
3
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
4
4
|
import { request } from "http";
|
|
5
5
|
import portfinder from "portfinder";
|
|
6
|
-
import { createProdServer } from "@modern-js/prod-server";
|
|
6
|
+
import { createProdServer, loadServerPlugins } from "@modern-js/prod-server";
|
|
7
7
|
import { CLOSE_SIGN } from "./consts";
|
|
8
8
|
process.on("message", function() {
|
|
9
9
|
var _ref = _async_to_generator(function(chunk) {
|
|
@@ -39,8 +39,8 @@ process.on("message", function() {
|
|
|
39
39
|
config: options,
|
|
40
40
|
appContext,
|
|
41
41
|
routes,
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
plugins: loadServerPlugins(plugins, appContext.appDirectory || distDirectory),
|
|
43
|
+
staticGenerate: true
|
|
44
44
|
};
|
|
45
45
|
return [
|
|
46
46
|
4,
|
|
@@ -13,7 +13,7 @@ const createServer = (api, ssgRoutes, pageRoutes, apiRoutes, options, appDirecto
|
|
|
13
13
|
silent: true
|
|
14
14
|
});
|
|
15
15
|
const appContext = api.useAppContext();
|
|
16
|
-
const plugins = appContext.
|
|
16
|
+
const plugins = appContext.serverPlugins;
|
|
17
17
|
cp.send(JSON.stringify({
|
|
18
18
|
options,
|
|
19
19
|
renderRoutes: ssgRoutes,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { request } from "http";
|
|
2
2
|
import portfinder from "portfinder";
|
|
3
|
-
import { createProdServer } from "@modern-js/prod-server";
|
|
3
|
+
import { createProdServer, loadServerPlugins } from "@modern-js/prod-server";
|
|
4
4
|
import { CLOSE_SIGN } from "./consts";
|
|
5
5
|
process.on("message", async (chunk) => {
|
|
6
6
|
if (chunk === CLOSE_SIGN) {
|
|
@@ -19,8 +19,8 @@ process.on("message", async (chunk) => {
|
|
|
19
19
|
config: options,
|
|
20
20
|
appContext,
|
|
21
21
|
routes,
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
plugins: loadServerPlugins(plugins, appContext.appDirectory || distDirectory),
|
|
23
|
+
staticGenerate: true
|
|
24
24
|
};
|
|
25
25
|
nodeServer = await createProdServer(serverOptions);
|
|
26
26
|
nodeServer.listen(port, async () => {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.54.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"normalize-path": "3.0.0",
|
|
64
64
|
"portfinder": "^1.0.28",
|
|
65
65
|
"@swc/helpers": "0.5.3",
|
|
66
|
-
"@modern-js/utils": "2.
|
|
67
|
-
"@modern-js/prod-server": "2.
|
|
66
|
+
"@modern-js/utils": "2.54.0",
|
|
67
|
+
"@modern-js/prod-server": "2.54.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react-router-dom": ">=5.1.2"
|
|
@@ -82,10 +82,10 @@
|
|
|
82
82
|
"react-dom": "^18",
|
|
83
83
|
"react-router-dom": "6.22.0",
|
|
84
84
|
"typescript": "^5",
|
|
85
|
-
"@modern-js/
|
|
86
|
-
"@
|
|
87
|
-
"@scripts/
|
|
88
|
-
"@
|
|
85
|
+
"@modern-js/app-tools": "2.54.0",
|
|
86
|
+
"@modern-js/types": "2.54.0",
|
|
87
|
+
"@scripts/build": "2.54.0",
|
|
88
|
+
"@scripts/jest-config": "2.54.0"
|
|
89
89
|
},
|
|
90
90
|
"sideEffects": false,
|
|
91
91
|
"publishConfig": {
|