@modern-js/app-tools 2.64.1 → 2.64.2

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.
Files changed (35) hide show
  1. package/dist/cjs/builder/generator/createBuilderProviderConfig.js +1 -0
  2. package/dist/cjs/builder/generator/getBuilderEnvironments.js +1 -1
  3. package/dist/cjs/builder/generator/index.js +2 -0
  4. package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +1 -1
  5. package/dist/cjs/commands/dev.js +12 -3
  6. package/dist/cjs/commands/index.js +2 -2
  7. package/dist/cjs/commands/serve.js +4 -4
  8. package/dist/cjs/index.js +4 -2
  9. package/dist/cjs/plugins/analyze/getFileSystemEntry.js +2 -2
  10. package/dist/cjs/plugins/analyze/getServerRoutes.js +5 -3
  11. package/dist/esm/builder/generator/createBuilderProviderConfig.js +1 -0
  12. package/dist/esm/builder/generator/getBuilderEnvironments.js +2 -2
  13. package/dist/esm/builder/generator/index.js +2 -0
  14. package/dist/esm/builder/shared/builderPlugins/adapterSSR.js +1 -1
  15. package/dist/esm/commands/dev.js +11 -5
  16. package/dist/esm/commands/index.js +3 -3
  17. package/dist/esm/commands/serve.js +5 -5
  18. package/dist/esm/index.js +3 -2
  19. package/dist/esm/plugins/analyze/getFileSystemEntry.js +2 -2
  20. package/dist/esm/plugins/analyze/getServerRoutes.js +5 -3
  21. package/dist/esm-node/builder/generator/createBuilderProviderConfig.js +1 -0
  22. package/dist/esm-node/builder/generator/getBuilderEnvironments.js +2 -2
  23. package/dist/esm-node/builder/generator/index.js +2 -0
  24. package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.js +1 -1
  25. package/dist/esm-node/commands/dev.js +12 -3
  26. package/dist/esm-node/commands/index.js +2 -2
  27. package/dist/esm-node/commands/serve.js +3 -3
  28. package/dist/esm-node/index.js +3 -2
  29. package/dist/esm-node/plugins/analyze/getFileSystemEntry.js +2 -2
  30. package/dist/esm-node/plugins/analyze/getServerRoutes.js +5 -3
  31. package/dist/types/commands/dev.d.ts +2 -1
  32. package/dist/types/commands/serve.d.ts +6 -1
  33. package/dist/types/index.d.ts +1 -0
  34. package/dist/types/types/new.d.ts +0 -5
  35. package/package.json +20 -21
@@ -52,6 +52,7 @@ function createBuilderProviderConfig(resolveConfig, appContext) {
52
52
  ...resolveConfig.dev,
53
53
  port: appContext.port
54
54
  },
55
+ server: resolveConfig.server,
55
56
  html: htmlConfig,
56
57
  output: {
57
58
  ...resolveConfig.output,
@@ -59,7 +59,7 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
59
59
  environments.web.output.copy = tempBuilderConfig.output.copy;
60
60
  delete tempBuilderConfig.output.copy;
61
61
  }
62
- const useNodeTarget = (0, import_utils.isProd)() ? (0, import_utils.isUseSSRBundle)(normalizedConfig) : (0, import_utils.isSSR)(normalizedConfig);
62
+ const useNodeTarget = (0, import_utils.isUseRsc)(normalizedConfig) || ((0, import_utils.isProd)() ? (0, import_utils.isUseSSRBundle)(normalizedConfig) : (0, import_utils.isSSR)(normalizedConfig));
63
63
  if (useNodeTarget) {
64
64
  environments.node = {
65
65
  output: {
@@ -43,6 +43,8 @@ async function generateBuilder(options, bundlerType) {
43
43
  builderConfig.environments = builderConfig.environments ? (0, import_core.mergeRsbuildConfig)(environments, builderConfig.environments) : environments;
44
44
  const builder = await (0, import_uni_builder.createUniBuilder)({
45
45
  cwd: appContext.appDirectory,
46
+ rscClientRuntimePath: `@${appContext.metaName}/runtime/rsc/client`,
47
+ rscServerRuntimePath: `@${appContext.metaName}/runtime/rsc/server`,
46
48
  frameworkConfigPath: appContext.configFile || void 0,
47
49
  bundlerType,
48
50
  config: builderConfig
@@ -150,7 +150,7 @@ function applyFilterEntriesBySSRConfig({ isProd, chain, appNormalizedConfig }) {
150
150
  }
151
151
  const { ssr, ssrByEntries } = serverConfig || {};
152
152
  entryNames.forEach((name) => {
153
- if (!ssgEntries.includes(name) && !name.includes("server-loaders") && (ssr && (ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]) === false || !ssr && !(ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]))) {
153
+ if (!(serverConfig === null || serverConfig === void 0 ? void 0 : serverConfig.rsc) && !ssgEntries.includes(name) && !name.includes("server-loaders") && (ssr && (ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]) === false || !ssr && !(ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]))) {
154
154
  chain.entryPoints.delete(name);
155
155
  }
156
156
  });
@@ -80,13 +80,22 @@ const dev = async (api, options, devServerOptions) => {
80
80
  }
81
81
  await (0, import_routes.generateRoutes)(appContext);
82
82
  const pluginInstances = await (0, import_loadPlugins.loadServerPlugins)(api, appDirectory, metaName);
83
+ const toolsDevServerConfig = (_normalizedConfig_tools = normalizedConfig.tools) === null || _normalizedConfig_tools === void 0 ? void 0 : _normalizedConfig_tools.devServer;
84
+ var _normalizedConfig_dev_host, _normalizedConfig_dev_https, _normalizedConfig_dev_hmr, _normalizedConfig_dev_setupMiddlewares;
83
85
  const serverOptions = {
84
86
  metaName,
85
87
  dev: {
88
+ // [`normalizedConfig.tools.devServer`](https://modernjs.dev/en/configure/app/tools/dev-server.html) already deprecated, we should using `normalizedConfig.dev` instead firstly.
89
+ // Oterwise, the `normalizedConfig.dev` can't be apply correctly.
90
+ ...toolsDevServerConfig,
91
+ devMiddleware: {
92
+ writeToDisk: normalizedConfig.dev.writeToDisk
93
+ },
86
94
  port,
87
- https: normalizedConfig.dev.https,
88
- host: normalizedConfig.dev.host,
89
- ...(_normalizedConfig_tools = normalizedConfig.tools) === null || _normalizedConfig_tools === void 0 ? void 0 : _normalizedConfig_tools.devServer
95
+ host: (_normalizedConfig_dev_host = normalizedConfig.dev.host) !== null && _normalizedConfig_dev_host !== void 0 ? _normalizedConfig_dev_host : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.host,
96
+ https: (_normalizedConfig_dev_https = normalizedConfig.dev.https) !== null && _normalizedConfig_dev_https !== void 0 ? _normalizedConfig_dev_https : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.https,
97
+ hot: (_normalizedConfig_dev_hmr = normalizedConfig.dev.hmr) !== null && _normalizedConfig_dev_hmr !== void 0 ? _normalizedConfig_dev_hmr : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.hot,
98
+ setupMiddlewares: (_normalizedConfig_dev_setupMiddlewares = normalizedConfig.dev.setupMiddlewares) !== null && _normalizedConfig_dev_setupMiddlewares !== void 0 ? _normalizedConfig_dev_setupMiddlewares : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.setupMiddlewares
90
99
  },
91
100
  appContext: {
92
101
  appDirectory,
@@ -84,8 +84,8 @@ const buildCommand = async (program, api) => {
84
84
  };
85
85
  const serverCommand = (program, api) => {
86
86
  program.command("serve").usage("[options]").description(import_locale.i18n.t(import_locale.localeKeys.command.serve.describe)).option("--api-only", import_locale.i18n.t(import_locale.localeKeys.command.dev.apiOnly)).option("-c --config <config>", import_locale.i18n.t(import_locale.localeKeys.command.shared.config)).action(async () => {
87
- const { start } = await import("./serve.js");
88
- await start(api);
87
+ const { serve } = await import("./serve.js");
88
+ await serve(api);
89
89
  });
90
90
  };
91
91
  const deployCommand = (program, api) => {
@@ -28,7 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var serve_exports = {};
30
30
  __export(serve_exports, {
31
- start: () => start
31
+ serve: () => serve
32
32
  });
33
33
  module.exports = __toCommonJS(serve_exports);
34
34
  var import_path = __toESM(require("path"));
@@ -36,7 +36,7 @@ var import_prod_server = require("@modern-js/prod-server");
36
36
  var import_utils = require("@modern-js/utils");
37
37
  var import_loadPlugins = require("../utils/loadPlugins");
38
38
  var import_printInstructions = require("../utils/printInstructions");
39
- const start = async (api) => {
39
+ const serve = async (api, serverOptions) => {
40
40
  var _userConfig_source, _userConfig_output_distPath;
41
41
  const appContext = api.getAppContext();
42
42
  const userConfig = api.getNormalizedConfig();
@@ -52,7 +52,7 @@ const start = async (api) => {
52
52
  const meta = (0, import_utils.getMeta)(metaName);
53
53
  const serverConfigPath = import_path.default.resolve(distDirectory, import_utils.SERVER_DIR, `${meta}.server`);
54
54
  const pluginInstances = await (0, import_loadPlugins.loadServerPlugins)(api, appDirectory, metaName);
55
- const app = await (0, import_prod_server.createProdServer)({
55
+ const app = await ((serverOptions === null || serverOptions === void 0 ? void 0 : serverOptions.launcher) || import_prod_server.createProdServer)({
56
56
  metaName,
57
57
  pwd: distDirectory,
58
58
  config: {
@@ -83,5 +83,5 @@ const start = async (api) => {
83
83
  };
84
84
  // Annotate the CommonJS export names for ESM import in node:
85
85
  0 && (module.exports = {
86
- start
86
+ serve
87
87
  });
package/dist/cjs/index.js CHANGED
@@ -36,7 +36,8 @@ __export(src_exports, {
36
36
  dev: () => import_dev.dev,
37
37
  generateWatchFiles: () => import_generateWatchFiles2.generateWatchFiles,
38
38
  initAppContext: () => import_initAppContext.initAppContext,
39
- mergeConfig: () => import_core.mergeConfig
39
+ mergeConfig: () => import_core.mergeConfig,
40
+ serve: () => import_serve.serve
40
41
  });
41
42
  module.exports = __toCommonJS(src_exports);
42
43
  var import_path = __toESM(require("path"));
@@ -59,6 +60,7 @@ __reExport(src_exports, require("./defineConfig"), module.exports);
59
60
  var import_defineConfig = require("./defineConfig");
60
61
  var import_core = require("@modern-js/core");
61
62
  var import_dev = require("./commands/dev");
63
+ var import_serve = require("./commands/serve");
62
64
  var import_generateWatchFiles2 = require("./utils/generateWatchFiles");
63
65
  __reExport(src_exports, require("./types"), module.exports);
64
66
  const appTools = (options = {
@@ -99,7 +101,6 @@ const appTools = (options = {
99
101
  checkEntryPoint: (0, import_plugin_v2.createAsyncHook)(),
100
102
  modifyEntrypoints: (0, import_plugin_v2.createAsyncHook)(),
101
103
  modifyFileSystemRoutes: (0, import_plugin_v2.createAsyncHook)(),
102
- modifyServerRoutes: (0, import_plugin_v2.createAsyncHook)(),
103
104
  generateEntryCode: (0, import_plugin_v2.createAsyncHook)(),
104
105
  onBeforeGenerateRoutes: (0, import_plugin_v2.createAsyncHook)(),
105
106
  onBeforePrintInstructions: (0, import_plugin_v2.createAsyncHook)(),
@@ -195,6 +196,7 @@ var src_default = appTools;
195
196
  generateWatchFiles,
196
197
  initAppContext,
197
198
  mergeConfig,
199
+ serve,
198
200
  ...require("./defineConfig"),
199
201
  ...require("./types")
200
202
  });
@@ -79,7 +79,7 @@ const scanDir = async (hooks, dirs, enableCustomEntry) => {
79
79
  entryName,
80
80
  isMainEntry: false,
81
81
  entry: enableCustomEntry ? customEntryFile || entryFile : entryFile,
82
- customServerEntry,
82
+ customServerEntry: enableCustomEntry ? customServerEntry : false,
83
83
  absoluteEntryDir: import_path.default.resolve(dir),
84
84
  isAutoMount: true,
85
85
  customBootstrap,
@@ -91,7 +91,7 @@ const scanDir = async (hooks, dirs, enableCustomEntry) => {
91
91
  entryName,
92
92
  isMainEntry: false,
93
93
  entry: customEntryFile,
94
- customServerEntry,
94
+ customServerEntry: enableCustomEntry ? customServerEntry : false,
95
95
  absoluteEntryDir: import_path.default.resolve(dir),
96
96
  isAutoMount: false,
97
97
  customEntry: Boolean(customEntryFile)
@@ -103,7 +103,7 @@ const applyRouteOptions = (original, routeOptions) => {
103
103
  };
104
104
  const collectHtmlRoutes = (entrypoints, appContext, config) => {
105
105
  var _deploy_worker;
106
- const { source: { mainEntryName }, html: { disableHtmlFolder }, output: { distPath: { html: htmlPath } = {} }, server: { baseUrl, routes, ssr, ssrByEntries }, deploy } = config;
106
+ const { source: { mainEntryName }, html: { disableHtmlFolder }, output: { distPath: { html: htmlPath } = {} }, server: { baseUrl, routes, ssr, ssrByEntries, rsc }, deploy } = config;
107
107
  const { packageName } = appContext;
108
108
  const workerSSR = deploy === null || deploy === void 0 ? void 0 : (_deploy_worker = deploy.worker) === null || _deploy_worker === void 0 ? void 0 : _deploy_worker.ssr;
109
109
  let htmlRoutes = entrypoints.reduce((previous, { entryName }) => {
@@ -113,16 +113,18 @@ const collectHtmlRoutes = (entrypoints, appContext, config) => {
113
113
  const isWorker = Boolean(workerSSR);
114
114
  const isStream = typeof entryOptions === "object" && entryOptions.mode === "stream";
115
115
  const { resHeaders } = (routes === null || routes === void 0 ? void 0 : routes[entryName]) || {};
116
+ const isRSC = !!rsc;
116
117
  let route = {
117
118
  urlPath: `/${isMain ? "" : entryName}`,
118
119
  entryName,
119
120
  entryPath: (0, import_utils.removeLeadingSlash)(import_path.default.posix.normalize(`${htmlPath}/${entryName}${disableHtmlFolder ? ".html" : "/index.html"}`)),
120
121
  isSPA: true,
121
- isStream,
122
+ isStream: isStream || isRSC,
122
123
  isSSR,
124
+ isRSC,
123
125
  responseHeaders: resHeaders,
124
126
  worker: isWorker ? `${import_utils.SERVER_WORKER_BUNDLE_DIRECTORY}/${entryName}.js` : void 0,
125
- bundle: isSSR ? `${import_utils.SERVER_BUNDLE_DIRECTORY}/${entryName}.js` : void 0
127
+ bundle: isSSR || isRSC ? `${import_utils.SERVER_BUNDLE_DIRECTORY}/${entryName}.js` : void 0
126
128
  };
127
129
  if (routes === null || routes === void 0 ? void 0 : routes.hasOwnProperty(entryName)) {
128
130
  const routeOptions = (0, import_utils.isPlainObject)(routes[entryName]) ? routes[entryName] : {
@@ -23,6 +23,7 @@ function createBuilderProviderConfig(resolveConfig, appContext) {
23
23
  dev: _object_spread_props(_object_spread({}, resolveConfig.dev), {
24
24
  port: appContext.port
25
25
  }),
26
+ server: resolveConfig.server,
26
27
  html: htmlConfig,
27
28
  output: _object_spread_props(_object_spread({}, resolveConfig.output), {
28
29
  // We need to do this in the app-tools prepare hook because some files will be generated into the dist directory in the analyze process
@@ -1,5 +1,5 @@
1
1
  import { SERVICE_WORKER_ENVIRONMENT_NAME } from "@modern-js/uni-builder";
2
- import { isProd, isSSR, isServiceWorker, isUseSSRBundle } from "@modern-js/utils";
2
+ import { isProd, isSSR, isServiceWorker, isUseRsc, isUseSSRBundle } from "@modern-js/utils";
3
3
  function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig) {
4
4
  var _tempBuilderConfig_output;
5
5
  var entries = {};
@@ -57,7 +57,7 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
57
57
  environments.web.output.copy = tempBuilderConfig.output.copy;
58
58
  delete tempBuilderConfig.output.copy;
59
59
  }
60
- var useNodeTarget = isProd() ? isUseSSRBundle(normalizedConfig) : isSSR(normalizedConfig);
60
+ var useNodeTarget = isUseRsc(normalizedConfig) || (isProd() ? isUseSSRBundle(normalizedConfig) : isSSR(normalizedConfig));
61
61
  if (useNodeTarget) {
62
62
  environments.node = {
63
63
  output: {
@@ -22,6 +22,8 @@ function _generateBuilder() {
22
22
  4,
23
23
  createUniBuilder({
24
24
  cwd: appContext.appDirectory,
25
+ rscClientRuntimePath: "@".concat(appContext.metaName, "/runtime/rsc/client"),
26
+ rscServerRuntimePath: "@".concat(appContext.metaName, "/runtime/rsc/server"),
25
27
  frameworkConfigPath: appContext.configFile || void 0,
26
28
  bundlerType,
27
29
  config: builderConfig
@@ -170,7 +170,7 @@ function applyFilterEntriesBySSRConfig(param) {
170
170
  }
171
171
  var _ref = serverConfig || {}, ssr = _ref.ssr, ssrByEntries = _ref.ssrByEntries;
172
172
  entryNames.forEach(function(name) {
173
- if (!ssgEntries.includes(name) && !name.includes("server-loaders") && (ssr && (ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]) === false || !ssr && !(ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]))) {
173
+ if (!(serverConfig === null || serverConfig === void 0 ? void 0 : serverConfig.rsc) && !ssgEntries.includes(name) && !name.includes("server-loaders") && (ssr && (ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]) === false || !ssr && !(ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]))) {
174
174
  chain.entryPoints.delete(name);
175
175
  }
176
176
  });
@@ -14,7 +14,7 @@ import { registerCompiler } from "../utils/register";
14
14
  import { generateRoutes } from "../utils/routes";
15
15
  var dev = function() {
16
16
  var _ref = _async_to_generator(function(api, options, devServerOptions) {
17
- var _normalizedConfig_source, _normalizedConfig_tools, _normalizedConfig_dev, normalizedConfig, appContext, hooks, _normalizedConfig_source1, registerEsm, appDirectory, distDirectory, port, apiOnly, serverConfigFile, metaName, serverRoutes, meta, serverConfigPath, pluginInstances, serverOptions, host, server, _ref2, server1, afterListen;
17
+ var _normalizedConfig_source, _normalizedConfig_tools, _normalizedConfig_dev, normalizedConfig, appContext, hooks, _normalizedConfig_source1, registerEsm, appDirectory, distDirectory, port, apiOnly, serverConfigFile, metaName, serverRoutes, meta, serverConfigPath, pluginInstances, toolsDevServerConfig, _normalizedConfig_dev_host, _normalizedConfig_dev_https, _normalizedConfig_dev_hmr, _normalizedConfig_dev_setupMiddlewares, serverOptions, host, server, _ref2, server1, afterListen;
18
18
  return _ts_generator(this, function(_state) {
19
19
  switch (_state.label) {
20
20
  case 0:
@@ -93,13 +93,19 @@ var dev = function() {
93
93
  ];
94
94
  case 8:
95
95
  pluginInstances = _state.sent();
96
+ toolsDevServerConfig = (_normalizedConfig_tools = normalizedConfig.tools) === null || _normalizedConfig_tools === void 0 ? void 0 : _normalizedConfig_tools.devServer;
96
97
  serverOptions = _object_spread({
97
98
  metaName,
98
- dev: _object_spread({
99
+ dev: _object_spread_props(_object_spread({}, toolsDevServerConfig), {
100
+ devMiddleware: {
101
+ writeToDisk: normalizedConfig.dev.writeToDisk
102
+ },
99
103
  port,
100
- https: normalizedConfig.dev.https,
101
- host: normalizedConfig.dev.host
102
- }, (_normalizedConfig_tools = normalizedConfig.tools) === null || _normalizedConfig_tools === void 0 ? void 0 : _normalizedConfig_tools.devServer),
104
+ host: (_normalizedConfig_dev_host = normalizedConfig.dev.host) !== null && _normalizedConfig_dev_host !== void 0 ? _normalizedConfig_dev_host : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.host,
105
+ https: (_normalizedConfig_dev_https = normalizedConfig.dev.https) !== null && _normalizedConfig_dev_https !== void 0 ? _normalizedConfig_dev_https : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.https,
106
+ hot: (_normalizedConfig_dev_hmr = normalizedConfig.dev.hmr) !== null && _normalizedConfig_dev_hmr !== void 0 ? _normalizedConfig_dev_hmr : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.hot,
107
+ setupMiddlewares: (_normalizedConfig_dev_setupMiddlewares = normalizedConfig.dev.setupMiddlewares) !== null && _normalizedConfig_dev_setupMiddlewares !== void 0 ? _normalizedConfig_dev_setupMiddlewares : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.setupMiddlewares
108
+ }),
103
109
  appContext: {
104
110
  appDirectory,
105
111
  internalDirectory: appContext.internalDirectory,
@@ -249,7 +249,7 @@ var buildCommand = function() {
249
249
  }();
250
250
  var serverCommand = function(program, api) {
251
251
  program.command("serve").usage("[options]").description(i18n.t(localeKeys.command.serve.describe)).option("--api-only", i18n.t(localeKeys.command.dev.apiOnly)).option("-c --config <config>", i18n.t(localeKeys.command.shared.config)).action(/* @__PURE__ */ _async_to_generator(function() {
252
- var start;
252
+ var serve;
253
253
  return _ts_generator(this, function(_state) {
254
254
  switch (_state.label) {
255
255
  case 0:
@@ -258,10 +258,10 @@ var serverCommand = function(program, api) {
258
258
  import("./serve.js")
259
259
  ];
260
260
  case 1:
261
- start = _state.sent().start;
261
+ serve = _state.sent().serve;
262
262
  return [
263
263
  4,
264
- start(api)
264
+ serve(api)
265
265
  ];
266
266
  case 2:
267
267
  _state.sent();
@@ -7,8 +7,8 @@ import { createProdServer } from "@modern-js/prod-server";
7
7
  import { SERVER_DIR, getMeta, getTargetDir, isApiOnly, logger } from "@modern-js/utils";
8
8
  import { loadServerPlugins } from "../utils/loadPlugins";
9
9
  import { printInstructions } from "../utils/printInstructions";
10
- var start = function() {
11
- var _ref = _async_to_generator(function(api) {
10
+ var serve = function() {
11
+ var _ref = _async_to_generator(function(api, serverOptions) {
12
12
  var _userConfig_source, _userConfig_output_distPath, appContext, userConfig, hooks, distDirectory, appDirectory, internalDirectory, port, metaName, serverRoutes, serverConfigFile, isCrossProjectServer, apiOnly, runMode, meta, serverConfigPath, pluginInstances, app;
13
13
  return _ts_generator(this, function(_state) {
14
14
  switch (_state.label) {
@@ -38,7 +38,7 @@ var start = function() {
38
38
  pluginInstances = _state.sent();
39
39
  return [
40
40
  4,
41
- createProdServer({
41
+ ((serverOptions === null || serverOptions === void 0 ? void 0 : serverOptions.launcher) || createProdServer)({
42
42
  metaName,
43
43
  pwd: distDirectory,
44
44
  config: _object_spread_props(_object_spread({}, userConfig), {
@@ -86,10 +86,10 @@ var start = function() {
86
86
  }
87
87
  });
88
88
  });
89
- return function start2(api) {
89
+ return function serve2(api, serverOptions) {
90
90
  return _ref.apply(this, arguments);
91
91
  };
92
92
  }();
93
93
  export {
94
- start
94
+ serve
95
95
  };
package/dist/esm/index.js CHANGED
@@ -58,7 +58,6 @@ var appTools = function() {
58
58
  checkEntryPoint: createAsyncHook(),
59
59
  modifyEntrypoints: createAsyncHook(),
60
60
  modifyFileSystemRoutes: createAsyncHook(),
61
- modifyServerRoutes: createAsyncHook(),
62
61
  generateEntryCode: createAsyncHook(),
63
62
  onBeforeGenerateRoutes: createAsyncHook(),
64
63
  onBeforePrintInstructions: createAsyncHook(),
@@ -247,6 +246,7 @@ var appTools = function() {
247
246
  import { defineConfig, defineLegacyConfig } from "./defineConfig";
248
247
  import { mergeConfig } from "@modern-js/core";
249
248
  import { dev } from "./commands/dev";
249
+ import { serve } from "./commands/serve";
250
250
  import { generateWatchFiles as generateWatchFiles2 } from "./utils/generateWatchFiles";
251
251
  export * from "./types";
252
252
  var src_default = appTools;
@@ -258,5 +258,6 @@ export {
258
258
  dev,
259
259
  generateWatchFiles2 as generateWatchFiles,
260
260
  initAppContext,
261
- mergeConfig
261
+ mergeConfig,
262
+ serve
262
263
  };
@@ -107,7 +107,7 @@ var scanDir = function() {
107
107
  entryName,
108
108
  isMainEntry: false,
109
109
  entry: enableCustomEntry ? customEntryFile || entryFile : entryFile,
110
- customServerEntry,
110
+ customServerEntry: enableCustomEntry ? customServerEntry : false,
111
111
  absoluteEntryDir: path.resolve(dir),
112
112
  isAutoMount: true,
113
113
  customBootstrap,
@@ -122,7 +122,7 @@ var scanDir = function() {
122
122
  entryName,
123
123
  isMainEntry: false,
124
124
  entry: customEntryFile,
125
- customServerEntry,
125
+ customServerEntry: enableCustomEntry ? customServerEntry : false,
126
126
  absoluteEntryDir: path.resolve(dir),
127
127
  isAutoMount: false,
128
128
  customEntry: Boolean(customEntryFile)
@@ -70,7 +70,7 @@ var applyRouteOptions = function(original, routeOptions) {
70
70
  };
71
71
  var collectHtmlRoutes = function(entrypoints, appContext, config) {
72
72
  var _deploy_worker;
73
- var mainEntryName = config.source.mainEntryName, disableHtmlFolder = config.html.disableHtmlFolder, _config_output = config.output, tmp = _config_output.distPath, _ref = tmp === void 0 ? {} : tmp, htmlPath = _ref.html, _config_server = config.server, baseUrl = _config_server.baseUrl, routes = _config_server.routes, ssr = _config_server.ssr, ssrByEntries = _config_server.ssrByEntries, deploy = config.deploy;
73
+ var mainEntryName = config.source.mainEntryName, disableHtmlFolder = config.html.disableHtmlFolder, _config_output = config.output, tmp = _config_output.distPath, _ref = tmp === void 0 ? {} : tmp, htmlPath = _ref.html, _config_server = config.server, baseUrl = _config_server.baseUrl, routes = _config_server.routes, ssr = _config_server.ssr, ssrByEntries = _config_server.ssrByEntries, rsc = _config_server.rsc, deploy = config.deploy;
74
74
  var packageName = appContext.packageName;
75
75
  var workerSSR = deploy === null || deploy === void 0 ? void 0 : (_deploy_worker = deploy.worker) === null || _deploy_worker === void 0 ? void 0 : _deploy_worker.ssr;
76
76
  var htmlRoutes = entrypoints.reduce(function(previous, param) {
@@ -81,16 +81,18 @@ var collectHtmlRoutes = function(entrypoints, appContext, config) {
81
81
  var isWorker = Boolean(workerSSR);
82
82
  var isStream = (typeof entryOptions === "undefined" ? "undefined" : _type_of(entryOptions)) === "object" && entryOptions.mode === "stream";
83
83
  var resHeaders = ((routes === null || routes === void 0 ? void 0 : routes[entryName]) || {}).resHeaders;
84
+ var isRSC = !!rsc;
84
85
  var route = {
85
86
  urlPath: "/".concat(isMain ? "" : entryName),
86
87
  entryName,
87
88
  entryPath: removeLeadingSlash(path.posix.normalize("".concat(htmlPath, "/").concat(entryName).concat(disableHtmlFolder ? ".html" : "/index.html"))),
88
89
  isSPA: true,
89
- isStream,
90
+ isStream: isStream || isRSC,
90
91
  isSSR,
92
+ isRSC,
91
93
  responseHeaders: resHeaders,
92
94
  worker: isWorker ? "".concat(SERVER_WORKER_BUNDLE_DIRECTORY, "/").concat(entryName, ".js") : void 0,
93
- bundle: isSSR ? "".concat(SERVER_BUNDLE_DIRECTORY, "/").concat(entryName, ".js") : void 0
95
+ bundle: isSSR || isRSC ? "".concat(SERVER_BUNDLE_DIRECTORY, "/").concat(entryName, ".js") : void 0
94
96
  };
95
97
  if (routes === null || routes === void 0 ? void 0 : routes.hasOwnProperty(entryName)) {
96
98
  var routeOptions = isPlainObject(routes[entryName]) ? routes[entryName] : {
@@ -29,6 +29,7 @@ function createBuilderProviderConfig(resolveConfig, appContext) {
29
29
  ...resolveConfig.dev,
30
30
  port: appContext.port
31
31
  },
32
+ server: resolveConfig.server,
32
33
  html: htmlConfig,
33
34
  output: {
34
35
  ...resolveConfig.output,
@@ -1,5 +1,5 @@
1
1
  import { SERVICE_WORKER_ENVIRONMENT_NAME } from "@modern-js/uni-builder";
2
- import { isProd, isSSR, isServiceWorker, isUseSSRBundle } from "@modern-js/utils";
2
+ import { isProd, isSSR, isServiceWorker, isUseRsc, isUseSSRBundle } from "@modern-js/utils";
3
3
  function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig) {
4
4
  var _tempBuilderConfig_output;
5
5
  const entries = {};
@@ -36,7 +36,7 @@ function getBuilderEnvironments(normalizedConfig, appContext, tempBuilderConfig)
36
36
  environments.web.output.copy = tempBuilderConfig.output.copy;
37
37
  delete tempBuilderConfig.output.copy;
38
38
  }
39
- const useNodeTarget = isProd() ? isUseSSRBundle(normalizedConfig) : isSSR(normalizedConfig);
39
+ const useNodeTarget = isUseRsc(normalizedConfig) || (isProd() ? isUseSSRBundle(normalizedConfig) : isSSR(normalizedConfig));
40
40
  if (useNodeTarget) {
41
41
  environments.node = {
42
42
  output: {
@@ -10,6 +10,8 @@ async function generateBuilder(options, bundlerType) {
10
10
  builderConfig.environments = builderConfig.environments ? mergeRsbuildConfig(environments, builderConfig.environments) : environments;
11
11
  const builder = await createUniBuilder({
12
12
  cwd: appContext.appDirectory,
13
+ rscClientRuntimePath: `@${appContext.metaName}/runtime/rsc/client`,
14
+ rscServerRuntimePath: `@${appContext.metaName}/runtime/rsc/server`,
13
15
  frameworkConfigPath: appContext.configFile || void 0,
14
16
  bundlerType,
15
17
  config: builderConfig
@@ -117,7 +117,7 @@ function applyFilterEntriesBySSRConfig({ isProd, chain, appNormalizedConfig }) {
117
117
  }
118
118
  const { ssr, ssrByEntries } = serverConfig || {};
119
119
  entryNames.forEach((name) => {
120
- if (!ssgEntries.includes(name) && !name.includes("server-loaders") && (ssr && (ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]) === false || !ssr && !(ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]))) {
120
+ if (!(serverConfig === null || serverConfig === void 0 ? void 0 : serverConfig.rsc) && !ssgEntries.includes(name) && !name.includes("server-loaders") && (ssr && (ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]) === false || !ssr && !(ssrByEntries === null || ssrByEntries === void 0 ? void 0 : ssrByEntries[name]))) {
121
121
  chain.entryPoints.delete(name);
122
122
  }
123
123
  });
@@ -47,13 +47,22 @@ const dev = async (api, options, devServerOptions) => {
47
47
  }
48
48
  await generateRoutes(appContext);
49
49
  const pluginInstances = await loadServerPlugins(api, appDirectory, metaName);
50
+ const toolsDevServerConfig = (_normalizedConfig_tools = normalizedConfig.tools) === null || _normalizedConfig_tools === void 0 ? void 0 : _normalizedConfig_tools.devServer;
51
+ var _normalizedConfig_dev_host, _normalizedConfig_dev_https, _normalizedConfig_dev_hmr, _normalizedConfig_dev_setupMiddlewares;
50
52
  const serverOptions = {
51
53
  metaName,
52
54
  dev: {
55
+ // [`normalizedConfig.tools.devServer`](https://modernjs.dev/en/configure/app/tools/dev-server.html) already deprecated, we should using `normalizedConfig.dev` instead firstly.
56
+ // Oterwise, the `normalizedConfig.dev` can't be apply correctly.
57
+ ...toolsDevServerConfig,
58
+ devMiddleware: {
59
+ writeToDisk: normalizedConfig.dev.writeToDisk
60
+ },
53
61
  port,
54
- https: normalizedConfig.dev.https,
55
- host: normalizedConfig.dev.host,
56
- ...(_normalizedConfig_tools = normalizedConfig.tools) === null || _normalizedConfig_tools === void 0 ? void 0 : _normalizedConfig_tools.devServer
62
+ host: (_normalizedConfig_dev_host = normalizedConfig.dev.host) !== null && _normalizedConfig_dev_host !== void 0 ? _normalizedConfig_dev_host : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.host,
63
+ https: (_normalizedConfig_dev_https = normalizedConfig.dev.https) !== null && _normalizedConfig_dev_https !== void 0 ? _normalizedConfig_dev_https : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.https,
64
+ hot: (_normalizedConfig_dev_hmr = normalizedConfig.dev.hmr) !== null && _normalizedConfig_dev_hmr !== void 0 ? _normalizedConfig_dev_hmr : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.hot,
65
+ setupMiddlewares: (_normalizedConfig_dev_setupMiddlewares = normalizedConfig.dev.setupMiddlewares) !== null && _normalizedConfig_dev_setupMiddlewares !== void 0 ? _normalizedConfig_dev_setupMiddlewares : toolsDevServerConfig === null || toolsDevServerConfig === void 0 ? void 0 : toolsDevServerConfig.setupMiddlewares
57
66
  },
58
67
  appContext: {
59
68
  appDirectory,
@@ -45,8 +45,8 @@ const buildCommand = async (program, api) => {
45
45
  };
46
46
  const serverCommand = (program, api) => {
47
47
  program.command("serve").usage("[options]").description(i18n.t(localeKeys.command.serve.describe)).option("--api-only", i18n.t(localeKeys.command.dev.apiOnly)).option("-c --config <config>", i18n.t(localeKeys.command.shared.config)).action(async () => {
48
- const { start } = await import("./serve.js");
49
- await start(api);
48
+ const { serve } = await import("./serve.js");
49
+ await serve(api);
50
50
  });
51
51
  };
52
52
  const deployCommand = (program, api) => {
@@ -3,7 +3,7 @@ import { createProdServer } from "@modern-js/prod-server";
3
3
  import { SERVER_DIR, getMeta, getTargetDir, isApiOnly, logger } from "@modern-js/utils";
4
4
  import { loadServerPlugins } from "../utils/loadPlugins";
5
5
  import { printInstructions } from "../utils/printInstructions";
6
- const start = async (api) => {
6
+ const serve = async (api, serverOptions) => {
7
7
  var _userConfig_source, _userConfig_output_distPath;
8
8
  const appContext = api.getAppContext();
9
9
  const userConfig = api.getNormalizedConfig();
@@ -19,7 +19,7 @@ const start = async (api) => {
19
19
  const meta = getMeta(metaName);
20
20
  const serverConfigPath = path.resolve(distDirectory, SERVER_DIR, `${meta}.server`);
21
21
  const pluginInstances = await loadServerPlugins(api, appDirectory, metaName);
22
- const app = await createProdServer({
22
+ const app = await ((serverOptions === null || serverOptions === void 0 ? void 0 : serverOptions.launcher) || createProdServer)({
23
23
  metaName,
24
24
  pwd: distDirectory,
25
25
  config: {
@@ -49,5 +49,5 @@ const start = async (api) => {
49
49
  });
50
50
  };
51
51
  export {
52
- start
52
+ serve
53
53
  };
@@ -53,7 +53,6 @@ const appTools = (options = {
53
53
  checkEntryPoint: createAsyncHook(),
54
54
  modifyEntrypoints: createAsyncHook(),
55
55
  modifyFileSystemRoutes: createAsyncHook(),
56
- modifyServerRoutes: createAsyncHook(),
57
56
  generateEntryCode: createAsyncHook(),
58
57
  onBeforeGenerateRoutes: createAsyncHook(),
59
58
  onBeforePrintInstructions: createAsyncHook(),
@@ -142,6 +141,7 @@ const appTools = (options = {
142
141
  import { defineConfig, defineLegacyConfig } from "./defineConfig";
143
142
  import { mergeConfig } from "@modern-js/core";
144
143
  import { dev } from "./commands/dev";
144
+ import { serve } from "./commands/serve";
145
145
  import { generateWatchFiles as generateWatchFiles2 } from "./utils/generateWatchFiles";
146
146
  export * from "./types";
147
147
  var src_default = appTools;
@@ -153,5 +153,6 @@ export {
153
153
  dev,
154
154
  generateWatchFiles2 as generateWatchFiles,
155
155
  initAppContext,
156
- mergeConfig
156
+ mergeConfig,
157
+ serve
157
158
  };
@@ -46,7 +46,7 @@ const scanDir = async (hooks, dirs, enableCustomEntry) => {
46
46
  entryName,
47
47
  isMainEntry: false,
48
48
  entry: enableCustomEntry ? customEntryFile || entryFile : entryFile,
49
- customServerEntry,
49
+ customServerEntry: enableCustomEntry ? customServerEntry : false,
50
50
  absoluteEntryDir: path.resolve(dir),
51
51
  isAutoMount: true,
52
52
  customBootstrap,
@@ -58,7 +58,7 @@ const scanDir = async (hooks, dirs, enableCustomEntry) => {
58
58
  entryName,
59
59
  isMainEntry: false,
60
60
  entry: customEntryFile,
61
- customServerEntry,
61
+ customServerEntry: enableCustomEntry ? customServerEntry : false,
62
62
  absoluteEntryDir: path.resolve(dir),
63
63
  isAutoMount: false,
64
64
  customEntry: Boolean(customEntryFile)
@@ -69,7 +69,7 @@ const applyRouteOptions = (original, routeOptions) => {
69
69
  };
70
70
  const collectHtmlRoutes = (entrypoints, appContext, config) => {
71
71
  var _deploy_worker;
72
- const { source: { mainEntryName }, html: { disableHtmlFolder }, output: { distPath: { html: htmlPath } = {} }, server: { baseUrl, routes, ssr, ssrByEntries }, deploy } = config;
72
+ const { source: { mainEntryName }, html: { disableHtmlFolder }, output: { distPath: { html: htmlPath } = {} }, server: { baseUrl, routes, ssr, ssrByEntries, rsc }, deploy } = config;
73
73
  const { packageName } = appContext;
74
74
  const workerSSR = deploy === null || deploy === void 0 ? void 0 : (_deploy_worker = deploy.worker) === null || _deploy_worker === void 0 ? void 0 : _deploy_worker.ssr;
75
75
  let htmlRoutes = entrypoints.reduce((previous, { entryName }) => {
@@ -79,16 +79,18 @@ const collectHtmlRoutes = (entrypoints, appContext, config) => {
79
79
  const isWorker = Boolean(workerSSR);
80
80
  const isStream = typeof entryOptions === "object" && entryOptions.mode === "stream";
81
81
  const { resHeaders } = (routes === null || routes === void 0 ? void 0 : routes[entryName]) || {};
82
+ const isRSC = !!rsc;
82
83
  let route = {
83
84
  urlPath: `/${isMain ? "" : entryName}`,
84
85
  entryName,
85
86
  entryPath: removeLeadingSlash(path.posix.normalize(`${htmlPath}/${entryName}${disableHtmlFolder ? ".html" : "/index.html"}`)),
86
87
  isSPA: true,
87
- isStream,
88
+ isStream: isStream || isRSC,
88
89
  isSSR,
90
+ isRSC,
89
91
  responseHeaders: resHeaders,
90
92
  worker: isWorker ? `${SERVER_WORKER_BUNDLE_DIRECTORY}/${entryName}.js` : void 0,
91
- bundle: isSSR ? `${SERVER_BUNDLE_DIRECTORY}/${entryName}.js` : void 0
93
+ bundle: isSSR || isRSC ? `${SERVER_BUNDLE_DIRECTORY}/${entryName}.js` : void 0
92
94
  };
93
95
  if (routes === null || routes === void 0 ? void 0 : routes.hasOwnProperty(entryName)) {
94
96
  const routeOptions = isPlainObject(routes[entryName]) ? routes[entryName] : {
@@ -2,7 +2,8 @@ import type { CLIPluginAPI } from '@modern-js/plugin-v2';
2
2
  import { type ApplyPlugins } from '@modern-js/server';
3
3
  import type { AppTools } from '../types';
4
4
  import type { DevOptions } from '../utils/types';
5
- export interface ExtraServerOptions {
5
+ interface ExtraServerOptions {
6
6
  applyPlugins?: ApplyPlugins;
7
7
  }
8
8
  export declare const dev: (api: CLIPluginAPI<AppTools<'shared'>>, options: DevOptions, devServerOptions?: ExtraServerOptions) => Promise<void>;
9
+ export {};
@@ -1,3 +1,8 @@
1
1
  import type { CLIPluginAPI } from '@modern-js/plugin-v2';
2
+ import { createProdServer } from '@modern-js/prod-server';
2
3
  import type { AppTools } from '../types';
3
- export declare const start: (api: CLIPluginAPI<AppTools<'shared'>>) => Promise<void>;
4
+ type ExtraServerOptions = {
5
+ launcher?: typeof createProdServer;
6
+ };
7
+ export declare const serve: (api: CLIPluginAPI<AppTools<'shared'>>, serverOptions?: ExtraServerOptions) => Promise<void>;
8
+ export {};
@@ -6,6 +6,7 @@ export { defineConfig, defineLegacyConfig } from './defineConfig';
6
6
  export { mergeConfig } from '@modern-js/core';
7
7
  export type { RuntimeUserConfig } from './types/config';
8
8
  export { dev } from './commands/dev';
9
+ export { serve } from './commands/serve';
9
10
  export type { DevOptions } from './utils/types';
10
11
  export { generateWatchFiles } from './utils/generateWatchFiles';
11
12
  export * from './types';
@@ -18,9 +18,6 @@ export type ModifyFileSystemRoutesFn = TransformFunction<{
18
18
  entrypoint: Entrypoint;
19
19
  routes: RouteLegacy[] | (NestedRouteForCli | PageRoute)[];
20
20
  }>;
21
- export type ModifyServerRoutesFn = TransformFunction<{
22
- routes: ServerRoute[];
23
- }>;
24
21
  export type DeplpoyFn = () => Promise<void> | void;
25
22
  export type GenerateEntryCodeFn = (params: {
26
23
  entrypoints: Entrypoint[];
@@ -41,7 +38,6 @@ export interface AppToolsExtendAPI<B extends Bundler = 'webpack'> {
41
38
  checkEntryPoint: PluginHookTap<CheckEntryPointFn>;
42
39
  modifyEntrypoints: PluginHookTap<ModifyEntrypointsFn>;
43
40
  modifyFileSystemRoutes: PluginHookTap<ModifyFileSystemRoutesFn>;
44
- modifyServerRoutes: PluginHookTap<ModifyServerRoutesFn>;
45
41
  generateEntryCode: PluginHookTap<GenerateEntryCodeFn>;
46
42
  onBeforeGenerateRoutes: PluginHookTap<BeforeGenerateRoutesFn>;
47
43
  /**
@@ -83,7 +79,6 @@ export interface AppToolsExtendHooks extends Record<string, PluginHook<(...args:
83
79
  checkEntryPoint: AsyncHook<CheckEntryPointFn>;
84
80
  modifyEntrypoints: AsyncHook<ModifyEntrypointsFn>;
85
81
  modifyFileSystemRoutes: AsyncHook<ModifyFileSystemRoutesFn>;
86
- modifyServerRoutes: AsyncHook<ModifyServerRoutesFn>;
87
82
  generateEntryCode: AsyncHook<GenerateEntryCodeFn>;
88
83
  onBeforeGenerateRoutes: AsyncHook<BeforeGenerateRoutesFn>;
89
84
  /**
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.64.1",
18
+ "version": "2.64.2",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -80,32 +80,31 @@
80
80
  "@babel/parser": "^7.22.15",
81
81
  "@babel/traverse": "^7.23.2",
82
82
  "@babel/types": "^7.26.0",
83
- "@rsbuild/core": "1.1.13",
84
- "@rsbuild/plugin-node-polyfill": "1.2.0",
83
+ "@rsbuild/core": "1.2.7",
84
+ "@rsbuild/plugin-node-polyfill": "1.3.0",
85
85
  "@swc/helpers": "0.5.13",
86
- "@vercel/nft": "^0.29.0",
87
86
  "es-module-lexer": "^1.1.0",
88
87
  "esbuild": "0.17.19",
89
88
  "esbuild-register": "^3.5.0",
90
89
  "flatted": "^3.2.9",
91
90
  "mlly": "^1.6.1",
92
- "pkg-types": "^1.1.0",
93
91
  "ndepe": "0.1.5",
92
+ "pkg-types": "^1.1.0",
94
93
  "std-env": "^3.7.0",
95
- "@modern-js/node-bundle-require": "2.64.1",
96
- "@modern-js/core": "2.64.1",
97
- "@modern-js/plugin": "2.64.1",
98
- "@modern-js/plugin-data-loader": "2.64.1",
99
- "@modern-js/plugin-v2": "2.64.1",
100
- "@modern-js/plugin-i18n": "2.64.1",
101
- "@modern-js/rsbuild-plugin-esbuild": "2.64.1",
102
- "@modern-js/prod-server": "2.64.1",
103
- "@modern-js/server": "2.64.1",
104
- "@modern-js/server-core": "2.64.1",
105
- "@modern-js/server-utils": "2.64.1",
106
- "@modern-js/types": "2.64.1",
107
- "@modern-js/uni-builder": "2.64.1",
108
- "@modern-js/utils": "2.64.1"
94
+ "@modern-js/core": "2.64.2",
95
+ "@modern-js/node-bundle-require": "2.64.2",
96
+ "@modern-js/plugin-data-loader": "2.64.2",
97
+ "@modern-js/plugin": "2.64.2",
98
+ "@modern-js/plugin-i18n": "2.64.2",
99
+ "@modern-js/plugin-v2": "2.64.2",
100
+ "@modern-js/rsbuild-plugin-esbuild": "2.64.2",
101
+ "@modern-js/prod-server": "2.64.2",
102
+ "@modern-js/server": "2.64.2",
103
+ "@modern-js/server-core": "2.64.2",
104
+ "@modern-js/server-utils": "2.64.2",
105
+ "@modern-js/types": "2.64.2",
106
+ "@modern-js/uni-builder": "2.64.2",
107
+ "@modern-js/utils": "2.64.2"
109
108
  },
110
109
  "devDependencies": {
111
110
  "@rsbuild/plugin-webpack-swc": "1.0.9",
@@ -117,8 +116,8 @@
117
116
  "tsconfig-paths": "^4.2.0",
118
117
  "typescript": "^5",
119
118
  "webpack": "^5.97.1",
120
- "@scripts/build": "2.64.1",
121
- "@scripts/jest-config": "2.64.1"
119
+ "@scripts/build": "2.64.2",
120
+ "@scripts/jest-config": "2.64.2"
122
121
  },
123
122
  "peerDependencies": {
124
123
  "ts-node": "^10.7.0",