@modern-js/server 2.60.2 → 2.60.4

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.
@@ -60,7 +60,8 @@ async function createDevServer(options, applyPlugins) {
60
60
  nodeServer = await (0, import_node.createNodeServer)(server.handle.bind(server));
61
61
  }
62
62
  const builderDevServer = await (builder === null || builder === void 0 ? void 0 : builder.createDevServer({
63
- runCompile: options.runCompile
63
+ runCompile: options.runCompile,
64
+ compiler: options.compilier
64
65
  }));
65
66
  server.addPlugins([
66
67
  (0, import_dev.devPlugin)({
@@ -73,7 +73,8 @@ function _createDevServer() {
73
73
  return [
74
74
  4,
75
75
  builder === null || builder === void 0 ? void 0 : builder.createDevServer({
76
- runCompile: options.runCompile
76
+ runCompile: options.runCompile,
77
+ compiler: options.compilier
77
78
  })
78
79
  ];
79
80
  case 8:
@@ -27,7 +27,8 @@ async function createDevServer(options, applyPlugins) {
27
27
  nodeServer = await createNodeServer(server.handle.bind(server));
28
28
  }
29
29
  const builderDevServer = await (builder === null || builder === void 0 ? void 0 : builder.createDevServer({
30
- runCompile: options.runCompile
30
+ runCompile: options.runCompile,
31
+ compiler: options.compilier
31
32
  }));
32
33
  server.addPlugins([
33
34
  devPlugin({
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import type { DevServerHttpsOptions, DevServerOptions } from '@modern-js/types';
3
- import type { UniBuilderInstance } from '@modern-js/uni-builder';
3
+ import type { Rspack, UniBuilderInstance } from '@modern-js/uni-builder';
4
4
  import type { NodeServer, ServerBase, ServerBaseOptions } from '@modern-js/server-core';
5
5
  export type { DevServerOptions, DevServerHttpsOptions };
6
6
  export type ExtraOptions = {
@@ -9,6 +9,10 @@ export type ExtraOptions = {
9
9
  host?: string;
10
10
  };
11
11
  runCompile?: boolean;
12
+ /**
13
+ * The existing compiler can be used here.
14
+ */
15
+ compilier?: Rspack.Compiler | Rspack.MultiCompiler;
12
16
  /** compat, the default value is modern.server-runtime.config.ts */
13
17
  serverConfigFile?: string;
14
18
  serverConfigPath?: string;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.60.2",
18
+ "version": "2.60.4",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -44,15 +44,15 @@
44
44
  "@swc/helpers": "0.5.13",
45
45
  "axios": "^1.7.4",
46
46
  "connect-history-api-fallback": "^2.0.0",
47
- "http-compression": "1.0.6",
47
+ "http-compression": "1.1.1",
48
48
  "minimatch": "^3.0.4",
49
49
  "path-to-regexp": "^6.2.0",
50
50
  "ws": "^8.13.0",
51
- "@modern-js/runtime-utils": "2.60.2",
52
- "@modern-js/server-core": "2.60.2",
53
- "@modern-js/server-utils": "2.60.2",
54
- "@modern-js/utils": "2.60.2",
55
- "@modern-js/types": "2.60.2"
51
+ "@modern-js/server-core": "2.60.4",
52
+ "@modern-js/runtime-utils": "2.60.4",
53
+ "@modern-js/types": "2.60.4",
54
+ "@modern-js/server-utils": "2.60.4",
55
+ "@modern-js/utils": "2.60.4"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/connect-history-api-fallback": "^1.3.5",
@@ -65,11 +65,11 @@
65
65
  "ts-node": "^10.9.1",
66
66
  "tsconfig-paths": "4.1.1",
67
67
  "typescript": "^5",
68
- "webpack": "^5.94.0",
68
+ "webpack": "^5.95.0",
69
69
  "websocket": "^1",
70
- "@modern-js/uni-builder": "2.60.2",
71
- "@scripts/build": "2.60.2",
72
- "@scripts/jest-config": "2.60.2"
70
+ "@modern-js/uni-builder": "2.60.4",
71
+ "@scripts/build": "2.60.4",
72
+ "@scripts/jest-config": "2.60.4"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "devcert": "^1.2.2",