@modern-js/prod-server 3.0.0-alpha.0 → 3.0.0-alpha.1
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/apply.js +3 -2
- package/dist/esm/apply.mjs +3 -2
- package/dist/esm-node/apply.mjs +3 -2
- package/package.json +7 -7
package/dist/cjs/apply.js
CHANGED
|
@@ -36,7 +36,8 @@ function getLogger(_) {
|
|
|
36
36
|
return (0, utils_namespaceObject.createLogger)();
|
|
37
37
|
}
|
|
38
38
|
async function applyPlugins(serverBase, options, nodeServer) {
|
|
39
|
-
const { pwd, appContext, config, logger: optLogger } = options;
|
|
39
|
+
const { pwd, appContext, config, logger: optLogger, serverConfig } = options;
|
|
40
|
+
const enableRsc = config.server?.rsc ?? serverConfig?.server?.rsc ?? false;
|
|
40
41
|
const serverErrorHandler = options.serverConfig?.onError;
|
|
41
42
|
const loadCachePwd = (0, utils_namespaceObject.isProd)() ? pwd : appContext.appDirectory || pwd;
|
|
42
43
|
const cacheConfig = await (0, node_namespaceObject.loadCacheConfig)(loadCachePwd);
|
|
@@ -77,7 +78,7 @@ async function applyPlugins(serverBase, options, nodeServer) {
|
|
|
77
78
|
(0, server_core_namespaceObject.injectConfigMiddlewarePlugin)(middlewares, renderMiddlewares),
|
|
78
79
|
...options.plugins || [],
|
|
79
80
|
(0, node_namespaceObject.injectResourcePlugin)(),
|
|
80
|
-
(0, node_namespaceObject.injectRscManifestPlugin)(),
|
|
81
|
+
(0, node_namespaceObject.injectRscManifestPlugin)(enableRsc),
|
|
81
82
|
(0, node_namespaceObject.serverStaticPlugin)(),
|
|
82
83
|
(0, server_core_namespaceObject.faviconPlugin)(),
|
|
83
84
|
(0, server_core_namespaceObject.renderPlugin)()
|
package/dist/esm/apply.mjs
CHANGED
|
@@ -8,7 +8,8 @@ function getLogger(_) {
|
|
|
8
8
|
return createLogger();
|
|
9
9
|
}
|
|
10
10
|
async function applyPlugins(serverBase, options, nodeServer) {
|
|
11
|
-
const { pwd, appContext, config, logger: optLogger } = options;
|
|
11
|
+
const { pwd, appContext, config, logger: optLogger, serverConfig } = options;
|
|
12
|
+
const enableRsc = config.server?.rsc ?? serverConfig?.server?.rsc ?? false;
|
|
12
13
|
const serverErrorHandler = options.serverConfig?.onError;
|
|
13
14
|
const loadCachePwd = isProd() ? pwd : appContext.appDirectory || pwd;
|
|
14
15
|
const cacheConfig = await loadCacheConfig(loadCachePwd);
|
|
@@ -49,7 +50,7 @@ async function applyPlugins(serverBase, options, nodeServer) {
|
|
|
49
50
|
injectConfigMiddlewarePlugin(middlewares, renderMiddlewares),
|
|
50
51
|
...options.plugins || [],
|
|
51
52
|
injectResourcePlugin(),
|
|
52
|
-
injectRscManifestPlugin(),
|
|
53
|
+
injectRscManifestPlugin(enableRsc),
|
|
53
54
|
serverStaticPlugin(),
|
|
54
55
|
faviconPlugin(),
|
|
55
56
|
renderPlugin()
|
package/dist/esm-node/apply.mjs
CHANGED
|
@@ -8,7 +8,8 @@ function getLogger(_) {
|
|
|
8
8
|
return createLogger();
|
|
9
9
|
}
|
|
10
10
|
async function applyPlugins(serverBase, options, nodeServer) {
|
|
11
|
-
const { pwd, appContext, config, logger: optLogger } = options;
|
|
11
|
+
const { pwd, appContext, config, logger: optLogger, serverConfig } = options;
|
|
12
|
+
const enableRsc = config.server?.rsc ?? serverConfig?.server?.rsc ?? false;
|
|
12
13
|
const serverErrorHandler = options.serverConfig?.onError;
|
|
13
14
|
const loadCachePwd = isProd() ? pwd : appContext.appDirectory || pwd;
|
|
14
15
|
const cacheConfig = await loadCacheConfig(loadCachePwd);
|
|
@@ -49,7 +50,7 @@ async function applyPlugins(serverBase, options, nodeServer) {
|
|
|
49
50
|
injectConfigMiddlewarePlugin(middlewares, renderMiddlewares),
|
|
50
51
|
...options.plugins || [],
|
|
51
52
|
injectResourcePlugin(),
|
|
52
|
-
injectRscManifestPlugin(),
|
|
53
|
+
injectRscManifestPlugin(enableRsc),
|
|
53
54
|
serverStaticPlugin(),
|
|
54
55
|
faviconPlugin(),
|
|
55
56
|
renderPlugin()
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.0.0-alpha.
|
|
18
|
+
"version": "3.0.0-alpha.1",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -50,19 +50,19 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@swc/helpers": "^0.5.17",
|
|
53
|
-
"@modern-js/runtime-utils": "3.0.0-alpha.
|
|
54
|
-
"@modern-js/server-core": "3.0.0-alpha.
|
|
55
|
-
"@modern-js/utils": "3.0.0-alpha.
|
|
53
|
+
"@modern-js/runtime-utils": "3.0.0-alpha.1",
|
|
54
|
+
"@modern-js/server-core": "3.0.0-alpha.1",
|
|
55
|
+
"@modern-js/utils": "3.0.0-alpha.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/merge-deep": "^3.0.3",
|
|
59
59
|
"@types/node": "^20",
|
|
60
60
|
"lint-staged": "~13.3.0",
|
|
61
|
-
"@rslib/core": "0.
|
|
61
|
+
"@rslib/core": "0.19.1",
|
|
62
62
|
"typescript": "~5.0.4",
|
|
63
|
-
"@modern-js/types": "3.0.0-alpha.0",
|
|
64
63
|
"@scripts/rstest-config": "2.66.0",
|
|
65
|
-
"@modern-js/rslib": "2.68.10"
|
|
64
|
+
"@modern-js/rslib": "2.68.10",
|
|
65
|
+
"@modern-js/types": "3.0.0-alpha.1"
|
|
66
66
|
},
|
|
67
67
|
"sideEffects": [],
|
|
68
68
|
"engines": {
|