@rspack/dev-server 0.3.5 → 0.3.6
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/dist/server.js +7 -7
- package/package.json +4 -4
package/dist/server.js
CHANGED
|
@@ -109,8 +109,8 @@ class RspackDevServer extends webpack_dev_server_1.default {
|
|
|
109
109
|
? this.compiler.compilers
|
|
110
110
|
: [this.compiler];
|
|
111
111
|
compilers.forEach(compiler => {
|
|
112
|
-
var _a, _b, _c, _d;
|
|
113
|
-
var
|
|
112
|
+
var _a, _b, _c, _d, _e;
|
|
113
|
+
var _f, _g, _h, _j;
|
|
114
114
|
const mode = compiler.options.mode || process.env.NODE_ENV;
|
|
115
115
|
if (this.options.hot) {
|
|
116
116
|
if (mode === "production") {
|
|
@@ -118,14 +118,14 @@ class RspackDevServer extends webpack_dev_server_1.default {
|
|
|
118
118
|
"Make sure to disable HMR for production by setting `devServer.hot` to `false` in the configuration.");
|
|
119
119
|
}
|
|
120
120
|
// enable hot by default
|
|
121
|
-
(_a = (
|
|
121
|
+
(_a = (_f = compiler.options).devServer) !== null && _a !== void 0 ? _a : (_f.devServer = {});
|
|
122
122
|
compiler.options.devServer.hot = true;
|
|
123
123
|
if (!compiler.options.experiments.rspackFuture.disableTransformByDefault) {
|
|
124
|
-
(_b = (
|
|
124
|
+
(_b = (_g = compiler.options.builtins).react) !== null && _b !== void 0 ? _b : (_g.react = {});
|
|
125
125
|
// enable react.development by default
|
|
126
|
-
(_c = (
|
|
126
|
+
(_c = (_h = compiler.options.builtins.react).development) !== null && _c !== void 0 ? _c : (_h.development = true);
|
|
127
127
|
// enable react.refresh by default
|
|
128
|
-
(_d = (
|
|
128
|
+
(_d = (_j = compiler.options.builtins.react).refresh) !== null && _d !== void 0 ? _d : (_j.refresh = true);
|
|
129
129
|
if (compiler.options.builtins.react.refresh) {
|
|
130
130
|
const runtimePaths = plugin_react_refresh_1.default.deprecated_runtimePaths;
|
|
131
131
|
new compiler.webpack.EntryPlugin(compiler.context, runtimePaths[0], {
|
|
@@ -141,7 +141,7 @@ class RspackDevServer extends webpack_dev_server_1.default {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
else if (compiler.options.builtins.react.refresh) {
|
|
144
|
+
else if ((_e = compiler.options.builtins.react) === null || _e === void 0 ? void 0 : _e.refresh) {
|
|
145
145
|
if (mode === "production") {
|
|
146
146
|
this.logger.warn("React Refresh runtime should not be included in the production bundle.\n" +
|
|
147
147
|
"Make sure to disable React Refresh for production by setting `builtins.react.refresh` to `false` in the configuration.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/dev-server",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Development server for rspack",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@types/ws": "8.5.3",
|
|
29
29
|
"fs-extra": "11.1.0",
|
|
30
30
|
"puppeteer": "19.4.0",
|
|
31
|
-
"@rspack/core": "0.3.
|
|
31
|
+
"@rspack/core": "0.3.6"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"chokidar": "3.5.3",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"webpack-dev-middleware": "6.0.2",
|
|
41
41
|
"webpack-dev-server": "4.13.1",
|
|
42
42
|
"ws": "8.8.1",
|
|
43
|
-
"@rspack/dev-server": "0.3.
|
|
44
|
-
"@rspack/plugin-react-refresh": "0.3.
|
|
43
|
+
"@rspack/dev-server": "0.3.6",
|
|
44
|
+
"@rspack/plugin-react-refresh": "0.3.6"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@rspack/core": "*"
|