@modern-js/server 2.3.0 → 2.4.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 +15 -0
- package/README.md +14 -18
- package/dist/js/modern/dev-tools/dev-middleware/hmr-client/index.js +6 -3
- package/dist/js/node/dev-tools/dev-middleware/hmr-client/index.js +6 -3
- package/dist/js/treeshaking/dev-tools/dev-middleware/hmr-client/index.js +6 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @modern-js/server
|
|
2
2
|
|
|
3
|
+
## 2.4.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d19484c: feat(hmr-client): add HMR connected log
|
|
8
|
+
|
|
9
|
+
feat(hmr-client): add HMR 连接成功的日志
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [98a2733]
|
|
12
|
+
- Updated dependencies [8c2db5f]
|
|
13
|
+
- @modern-js/utils@2.4.0
|
|
14
|
+
- @modern-js/prod-server@2.4.0
|
|
15
|
+
- @modern-js/server-utils@2.4.0
|
|
16
|
+
- @modern-js/types@2.4.0
|
|
17
|
+
|
|
3
18
|
## 2.3.0
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
|
|
2
1
|
<p align="center">
|
|
3
2
|
<a href="https://modernjs.dev" target="blank"><img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png" width="300" alt="Modern.js Logo" /></a>
|
|
4
3
|
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Modern.js</h1>
|
|
6
|
+
|
|
5
7
|
<p align="center">
|
|
6
|
-
|
|
7
|
-
<br/>
|
|
8
|
-
<a href="https://modernjs.dev" target="blank">
|
|
9
|
-
modernjs.dev
|
|
10
|
-
</a>
|
|
11
|
-
</p>
|
|
12
|
-
<p align="center">
|
|
13
|
-
The meta-framework suite designed from scratch for frontend-focused modern web development
|
|
8
|
+
A Progressive React Framework for modern web development.
|
|
14
9
|
</p>
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.
|
|
11
|
+
## Getting Started
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
Please follow [Quick Start](https://modernjs.dev/en/guides/get-started/quick-start) to get started with Modern.js.
|
|
21
14
|
|
|
22
|
-
##
|
|
15
|
+
## Documentation
|
|
23
16
|
|
|
24
|
-
- [
|
|
25
|
-
- [
|
|
26
|
-
- [API References](https://modernjs.dev/docs/apis)
|
|
17
|
+
- [English Documentation](https://modernjs.dev/en/)
|
|
18
|
+
- [中文文档](https://modernjs.dev)
|
|
27
19
|
|
|
28
20
|
## Contributing
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
Please read the [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md).
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
Modern.js is [MIT licensed](https://github.com/modern-js-dev/modern.js/blob/main/LICENSE).
|
|
@@ -10,11 +10,14 @@ var require_hmr_client = __commonJS({
|
|
|
10
10
|
const hadRuntimeError = false;
|
|
11
11
|
const socketUrl = createSocketUrl(__resourceQuery);
|
|
12
12
|
const connection = new WebSocket(socketUrl);
|
|
13
|
+
connection.onopen = function() {
|
|
14
|
+
if (typeof console !== "undefined" && typeof console.debug === "function") {
|
|
15
|
+
console.debug("[HMR] connected.");
|
|
16
|
+
}
|
|
17
|
+
};
|
|
13
18
|
connection.onclose = function() {
|
|
14
19
|
if (typeof console !== "undefined" && typeof console.info === "function") {
|
|
15
|
-
console.
|
|
16
|
-
"The development server has disconnected.\nRefresh the page if necessary."
|
|
17
|
-
);
|
|
20
|
+
console.debug("[HMR] disconnected. Refresh the page if necessary.");
|
|
18
21
|
}
|
|
19
22
|
};
|
|
20
23
|
let isFirstCompilation = true;
|
|
@@ -22,11 +22,14 @@ var import_createSocketUrl = require("./createSocketUrl");
|
|
|
22
22
|
const hadRuntimeError = false;
|
|
23
23
|
const socketUrl = (0, import_createSocketUrl.createSocketUrl)(__resourceQuery);
|
|
24
24
|
const connection = new WebSocket(socketUrl);
|
|
25
|
+
connection.onopen = function() {
|
|
26
|
+
if (typeof console !== "undefined" && typeof console.debug === "function") {
|
|
27
|
+
console.debug("[HMR] connected.");
|
|
28
|
+
}
|
|
29
|
+
};
|
|
25
30
|
connection.onclose = function() {
|
|
26
31
|
if (typeof console !== "undefined" && typeof console.info === "function") {
|
|
27
|
-
console.
|
|
28
|
-
"The development server has disconnected.\nRefresh the page if necessary."
|
|
29
|
-
);
|
|
32
|
+
console.debug("[HMR] disconnected. Refresh the page if necessary.");
|
|
30
33
|
}
|
|
31
34
|
};
|
|
32
35
|
let isFirstCompilation = true;
|
|
@@ -95,9 +95,14 @@ var require_hmr_client = __commonJS({
|
|
|
95
95
|
var hadRuntimeError = false;
|
|
96
96
|
var socketUrl = createSocketUrl(__resourceQuery);
|
|
97
97
|
var connection = new WebSocket(socketUrl);
|
|
98
|
+
connection.onopen = function() {
|
|
99
|
+
if (typeof console !== "undefined" && typeof console.debug === "function") {
|
|
100
|
+
console.debug("[HMR] connected.");
|
|
101
|
+
}
|
|
102
|
+
};
|
|
98
103
|
connection.onclose = function() {
|
|
99
104
|
if (typeof console !== "undefined" && typeof console.info === "function") {
|
|
100
|
-
console.
|
|
105
|
+
console.debug("[HMR] disconnected. Refresh the page if necessary.");
|
|
101
106
|
}
|
|
102
107
|
};
|
|
103
108
|
var isFirstCompilation = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/server",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "A Progressive React Framework for modern web development.",
|
|
4
4
|
"homepage": "https://modernjs.dev",
|
|
5
5
|
"bugs": "https://github.com/modern-js-dev/modern.js/issues",
|
|
6
6
|
"repository": "modern-js-dev/modern.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.4.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.4.0",
|
|
38
|
+
"@modern-js/server-utils": "2.4.0",
|
|
39
|
+
"@modern-js/types": "2.4.0",
|
|
40
|
+
"@modern-js/utils": "2.4.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.4.0",
|
|
56
|
+
"@scripts/build": "2.4.0",
|
|
57
|
+
"@scripts/jest-config": "2.4.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"devcert": "^1.0.0",
|