@modern-js/server 1.4.17 → 1.4.18
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,23 @@
|
|
|
1
1
|
# @modern-js/server
|
|
2
2
|
|
|
3
|
+
## 1.4.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8d508c6ed: feat(devServer): support disable hmr or live reload
|
|
8
|
+
- a1198d509: feat: bump babel 7.18.0
|
|
9
|
+
- Updated dependencies [8d508c6ed]
|
|
10
|
+
- Updated dependencies [a1198d509]
|
|
11
|
+
- Updated dependencies [29728812e]
|
|
12
|
+
- Updated dependencies [147e090f7]
|
|
13
|
+
- Updated dependencies [18892c65c]
|
|
14
|
+
- Updated dependencies [a1198d509]
|
|
15
|
+
- @modern-js/webpack@1.10.0
|
|
16
|
+
- @modern-js/bff-utils@1.2.9
|
|
17
|
+
- @modern-js/hmr-client@1.2.8
|
|
18
|
+
- @modern-js/prod-server@1.1.8
|
|
19
|
+
- @modern-js/server-utils@1.2.10
|
|
20
|
+
|
|
3
21
|
## 1.4.17
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -11,20 +11,23 @@ export default class DevServerPlugin {
|
|
|
11
11
|
this.options = options;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
injectHMRClient(compiler) {
|
|
15
15
|
const {
|
|
16
16
|
client
|
|
17
17
|
} = this.options;
|
|
18
18
|
const host = client.host ? `&host=${client.host}` : '';
|
|
19
19
|
const path = client.path ? `&path=${client.path}` : '';
|
|
20
20
|
const port = client.port ? `&port=${client.port}` : '';
|
|
21
|
-
const clientEntry = `${require.resolve('@modern-js/hmr-client')}?${host}${path}${port}`;
|
|
22
|
-
|
|
21
|
+
const clientEntry = `${require.resolve('@modern-js/hmr-client')}?${host}${path}${port}`; // use a hook to add entries if available
|
|
22
|
+
|
|
23
|
+
new EntryPlugin(compiler.context, clientEntry, {
|
|
24
|
+
name: undefined
|
|
25
|
+
}).apply(compiler);
|
|
26
|
+
}
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}).apply(compiler);
|
|
28
|
+
apply(compiler) {
|
|
29
|
+
if (this.options.hot || this.options.liveReload) {
|
|
30
|
+
this.injectHMRClient(compiler);
|
|
28
31
|
} // Todo remove, client must inject.
|
|
29
32
|
|
|
30
33
|
|
|
@@ -20,20 +20,23 @@ class DevServerPlugin {
|
|
|
20
20
|
this.options = options;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
injectHMRClient(compiler) {
|
|
24
24
|
const {
|
|
25
25
|
client
|
|
26
26
|
} = this.options;
|
|
27
27
|
const host = client.host ? `&host=${client.host}` : '';
|
|
28
28
|
const path = client.path ? `&path=${client.path}` : '';
|
|
29
29
|
const port = client.port ? `&port=${client.port}` : '';
|
|
30
|
-
const clientEntry = `${require.resolve('@modern-js/hmr-client')}?${host}${path}${port}`;
|
|
31
|
-
|
|
30
|
+
const clientEntry = `${require.resolve('@modern-js/hmr-client')}?${host}${path}${port}`; // use a hook to add entries if available
|
|
31
|
+
|
|
32
|
+
new EntryPlugin(compiler.context, clientEntry, {
|
|
33
|
+
name: undefined
|
|
34
|
+
}).apply(compiler);
|
|
35
|
+
}
|
|
32
36
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}).apply(compiler);
|
|
37
|
+
apply(compiler) {
|
|
38
|
+
if (this.options.hot || this.options.liveReload) {
|
|
39
|
+
this.injectHMRClient(compiler);
|
|
37
40
|
} // Todo remove, client must inject.
|
|
38
41
|
|
|
39
42
|
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.4.
|
|
14
|
+
"version": "1.4.18",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@babel/core": "^7.
|
|
32
|
-
"@babel/register": "^7.
|
|
33
|
-
"@modern-js/bff-utils": "^1.2.
|
|
34
|
-
"@modern-js/hmr-client": "^1.2.
|
|
35
|
-
"@modern-js/prod-server": "^1.1.
|
|
36
|
-
"@modern-js/server-utils": "^1.2.
|
|
37
|
-
"@modern-js/webpack": "^1.
|
|
31
|
+
"@babel/core": "^7.18.0",
|
|
32
|
+
"@babel/register": "^7.17.7",
|
|
33
|
+
"@modern-js/bff-utils": "^1.2.9",
|
|
34
|
+
"@modern-js/hmr-client": "^1.2.8",
|
|
35
|
+
"@modern-js/prod-server": "^1.1.8",
|
|
36
|
+
"@modern-js/server-utils": "^1.2.10",
|
|
37
|
+
"@modern-js/webpack": "^1.10.0",
|
|
38
38
|
"@modern-js/utils": "^1.7.6",
|
|
39
39
|
"devcert": "1.2.0",
|
|
40
40
|
"minimatch": "^3.0.4",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"ws": "^8.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@modern-js/core": "1.11.
|
|
45
|
+
"@modern-js/core": "1.11.2",
|
|
46
46
|
"@modern-js/server-core": "1.3.5",
|
|
47
47
|
"@modern-js/types": "1.5.4",
|
|
48
48
|
"@scripts/build": "0.0.0",
|