@modern-js/server 2.1.0 → 2.2.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @modern-js/server
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9fc6de9: chore(devServer): make hmr client protocol configurable
|
|
8
|
+
|
|
9
|
+
chore(devServer): 支持配置 hmr client protocol
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [cb12ee7]
|
|
12
|
+
- Updated dependencies [49eff0c]
|
|
13
|
+
- Updated dependencies [2d3e3df]
|
|
14
|
+
- Updated dependencies [19bb384]
|
|
15
|
+
- @modern-js/server-utils@2.2.0
|
|
16
|
+
- @modern-js/utils@2.2.0
|
|
17
|
+
- @modern-js/prod-server@2.2.0
|
|
18
|
+
- @modern-js/types@2.2.0
|
|
19
|
+
|
|
3
20
|
## 2.1.0
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -39,10 +39,11 @@ import SocketServer from "./socket-server";
|
|
|
39
39
|
const noop = () => {
|
|
40
40
|
};
|
|
41
41
|
function getHMRClientPath(client) {
|
|
42
|
+
const protocol = (client == null ? void 0 : client.protocol) ? `&protocol=${client.protocol}` : "";
|
|
42
43
|
const host = (client == null ? void 0 : client.host) ? `&host=${client.host}` : "";
|
|
43
44
|
const path = (client == null ? void 0 : client.path) ? `&path=${client.path}` : "";
|
|
44
45
|
const port = (client == null ? void 0 : client.port) ? `&port=${client.port}` : "";
|
|
45
|
-
const clientEntry = `${require.resolve("./hmr-client")}?${host}${path}${port}`;
|
|
46
|
+
const clientEntry = `${require.resolve("./hmr-client")}?${host}${path}${port}${protocol}`;
|
|
46
47
|
return clientEntry;
|
|
47
48
|
}
|
|
48
49
|
class DevMiddleware extends EventEmitter {
|
|
@@ -65,10 +65,11 @@ var import_socket_server = __toESM(require("./socket-server"));
|
|
|
65
65
|
const noop = () => {
|
|
66
66
|
};
|
|
67
67
|
function getHMRClientPath(client) {
|
|
68
|
+
const protocol = (client == null ? void 0 : client.protocol) ? `&protocol=${client.protocol}` : "";
|
|
68
69
|
const host = (client == null ? void 0 : client.host) ? `&host=${client.host}` : "";
|
|
69
70
|
const path = (client == null ? void 0 : client.path) ? `&path=${client.path}` : "";
|
|
70
71
|
const port = (client == null ? void 0 : client.port) ? `&port=${client.port}` : "";
|
|
71
|
-
const clientEntry = `${require.resolve("./hmr-client")}?${host}${path}${port}`;
|
|
72
|
+
const clientEntry = `${require.resolve("./hmr-client")}?${host}${path}${port}${protocol}`;
|
|
72
73
|
return clientEntry;
|
|
73
74
|
}
|
|
74
75
|
class DevMiddleware extends import_events.EventEmitter {
|
|
@@ -239,10 +239,11 @@ import { EventEmitter } from "events";
|
|
|
239
239
|
import SocketServer from "./socket-server";
|
|
240
240
|
var noop = function() {};
|
|
241
241
|
function getHMRClientPath(client) {
|
|
242
|
+
var protocol = (client === null || client === void 0 ? void 0 : client.protocol) ? "&protocol=".concat(client.protocol) : "";
|
|
242
243
|
var host = (client === null || client === void 0 ? void 0 : client.host) ? "&host=".concat(client.host) : "";
|
|
243
244
|
var path = (client === null || client === void 0 ? void 0 : client.path) ? "&path=".concat(client.path) : "";
|
|
244
245
|
var port = (client === null || client === void 0 ? void 0 : client.port) ? "&port=".concat(client.port) : "";
|
|
245
|
-
var clientEntry = "".concat(require.resolve("./hmr-client"), "?").concat(host).concat(path).concat(port);
|
|
246
|
+
var clientEntry = "".concat(require.resolve("./hmr-client"), "?").concat(host).concat(path).concat(port).concat(protocol);
|
|
246
247
|
return clientEntry;
|
|
247
248
|
}
|
|
248
249
|
var DevMiddleware = /*#__PURE__*/ function(EventEmitter) {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.2.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"minimatch": "^3.0.4",
|
|
35
35
|
"path-to-regexp": "^6.2.0",
|
|
36
36
|
"ws": "^8.2.0",
|
|
37
|
-
"@modern-js/prod-server": "2.
|
|
38
|
-
"@modern-js/server-utils": "2.
|
|
39
|
-
"@modern-js/types": "2.
|
|
40
|
-
"@modern-js/utils": "2.
|
|
37
|
+
"@modern-js/prod-server": "2.2.0",
|
|
38
|
+
"@modern-js/server-utils": "2.2.0",
|
|
39
|
+
"@modern-js/types": "2.2.0",
|
|
40
|
+
"@modern-js/utils": "2.2.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/connect-history-api-fallback": "^1.3.5",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"typescript": "^4",
|
|
53
53
|
"webpack": "^5.75.0",
|
|
54
54
|
"websocket": "^1",
|
|
55
|
-
"@modern-js/server-core": "2.
|
|
56
|
-
"@scripts/
|
|
57
|
-
"@scripts/
|
|
55
|
+
"@modern-js/server-core": "2.2.0",
|
|
56
|
+
"@scripts/jest-config": "2.2.0",
|
|
57
|
+
"@scripts/build": "2.2.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"devcert": "^1.0.0",
|