@rspack/dev-server 2.0.0-rc.0 → 2.0.0-rc.1

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.
@@ -87,7 +87,7 @@ var __webpack_require__temp = __webpack_require__;
87
87
  (()=>{
88
88
  var installedChunks = {
89
89
  410: 0,
90
- 831: 0
90
+ 621: 0
91
91
  };
92
92
  var installChunk = (data)=>{
93
93
  var __rspack_esm_ids = data.__rspack_esm_ids;
@@ -1255,6 +1255,9 @@ __webpack_require__.add({
1255
1255
  else root.ipaddr = ipaddr;
1256
1256
  })(this);
1257
1257
  },
1258
+ assert (module) {
1259
+ module.exports = __rspack_createRequire_require("assert");
1260
+ },
1258
1261
  async_hooks (module) {
1259
1262
  module.exports = __rspack_createRequire_require("async_hooks");
1260
1263
  },
@@ -1267,12 +1270,21 @@ __webpack_require__.add({
1267
1270
  fs (module) {
1268
1271
  module.exports = __rspack_createRequire_require("fs");
1269
1272
  },
1273
+ http (module) {
1274
+ module.exports = __rspack_createRequire_require("http");
1275
+ },
1276
+ https (module) {
1277
+ module.exports = __rspack_createRequire_require("https");
1278
+ },
1270
1279
  os (module) {
1271
1280
  module.exports = __rspack_createRequire_require("os");
1272
1281
  },
1273
1282
  path (module) {
1274
1283
  module.exports = __rspack_createRequire_require("path");
1275
1284
  },
1285
+ querystring (module) {
1286
+ module.exports = __rspack_createRequire_require("querystring");
1287
+ },
1276
1288
  stream (module) {
1277
1289
  module.exports = __rspack_createRequire_require("stream");
1278
1290
  },
@@ -2243,7 +2255,7 @@ class Server {
2243
2255
  }
2244
2256
  });
2245
2257
  if (this.options.proxy) {
2246
- const { createProxyMiddleware } = server_require('http-proxy-middleware');
2258
+ const { createProxyMiddleware } = await import("./0~http-proxy-middleware.js").then(__webpack_require__.t.bind(__webpack_require__, "./node_modules/.pnpm/http-proxy-middleware@3.0.5/node_modules/http-proxy-middleware/dist/index.js", 23));
2247
2259
  const getProxyMiddleware = (proxyConfig)=>{
2248
2260
  const { context, ...proxyOptions } = proxyConfig;
2249
2261
  const pathFilter = proxyOptions.pathFilter ?? context;
@@ -2294,7 +2306,7 @@ class Server {
2294
2306
  middleware: serveStatic(staticOption.directory, staticOption.staticOptions)
2295
2307
  });
2296
2308
  if (this.options.historyApiFallback) {
2297
- const connectHistoryApiFallback = server_require('connect-history-api-fallback');
2309
+ const { default: connectHistoryApiFallback } = await import("./0~connect-history-api-fallback.js").then(__webpack_require__.t.bind(__webpack_require__, "./node_modules/.pnpm/connect-history-api-fallback@2.0.0/node_modules/connect-history-api-fallback/lib/index.js", 23));
2298
2310
  const { historyApiFallback } = this.options;
2299
2311
  if (void 0 === historyApiFallback && !historyApiFallback.verbose) historyApiFallback.logger = this.logger.log.bind(this.logger, '[connect-history-api-fallback]');
2300
2312
  middlewares.push({
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { RspackDevServer } from "./831.js";
1
+ export { RspackDevServer } from "./621.js";
package/dist/server.d.ts CHANGED
@@ -8,7 +8,8 @@
8
8
  * https://github.com/webpack/webpack-dev-server/blob/main/LICENSE
9
9
  */
10
10
  import type { DevServerClient, DevServerHeaders, DevServerHost, DevServerProxyConfigArray, DevServerStatic } from '@rspack/core';
11
- import type { BasicApplication, BasicServer, ClientConnection, Compiler, ConnectHistoryApiFallbackOptions, DevMiddlewareContext, DevMiddlewareOptions, DevServer, EXPECTED_ANY, FSWatcher, HTTPServer, LiteralUnion, Middleware, MultiCompiler, MultiStats, Open, Port, Request, RequestHandler, Response, ServerConfiguration, ServerType, Socket, Stats, StatsOptions, WatchFiles, WatchOptions, WebSocketServerConfiguration, WebSocketServerImplementation } from './types.js';
11
+ import type { NextHandleFunction } from 'connect-next';
12
+ import type { BasicApplication, BasicServer, ClientConnection, Compiler, ConnectHistoryApiFallbackOptions, DevMiddlewareContext, DevMiddlewareOptions, DevServer, EXPECTED_ANY, FSWatcher, HTTPServer, LiteralUnion, Middleware, MultiCompiler, MultiStats, Open, Port, Request, Response, ServerConfiguration, ServerType, Socket, Stats, StatsOptions, WatchFiles, WatchOptions, WebSocketServerConfiguration, WebSocketServerImplementation } from './types.js';
12
13
  import type { ConnectApplication } from './types.js';
13
14
  export interface Configuration<A extends BasicApplication = ConnectApplication, S extends BasicServer = HTTPServer> {
14
15
  ipc?: boolean | string;
@@ -43,7 +44,7 @@ declare class Server<A extends BasicApplication = ConnectApplication, S extends
43
44
  name: string | symbol;
44
45
  listener: (...args: EXPECTED_ANY[]) => void;
45
46
  }[];
46
- webSocketProxies: RequestHandler[];
47
+ webSocketProxies: NextHandleFunction[];
47
48
  sockets: Socket[];
48
49
  currentHash: string | undefined;
49
50
  isTlsServer: boolean;
package/dist/types.d.ts CHANGED
@@ -3,8 +3,7 @@ import type { ServerOptions } from 'node:https';
3
3
  import type { DevServer, DevServerMiddlewareHandler, DevServerOpenOptions, DevServerStaticItem } from '@rspack/core';
4
4
  import type { FSWatcher, ChokidarOptions as WatchOptions } from 'chokidar';
5
5
  import type { Server as ConnectApplication, IncomingMessage as ConnectIncomingMessage, ErrorHandleFunction, HandleFunction, NextHandleFunction } from 'connect-next';
6
- import type { RequestHandler } from 'http-proxy-middleware';
7
- export type { FSWatcher, WatchOptions, RequestHandler, BasicServer, HTTPServer, ServerOptions, IncomingMessage, ConnectApplication, };
6
+ export type { FSWatcher, WatchOptions, BasicServer, HTTPServer, ServerOptions, IncomingMessage, ConnectApplication, };
8
7
  export type { Socket } from 'node:net';
9
8
  export type { AddressInfo } from 'node:net';
10
9
  export type { NetworkInterfaceInfo } from 'node:os';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/dev-server",
3
- "version": "2.0.0-rc.0",
3
+ "version": "2.0.0-rc.1",
4
4
  "description": "Development server for rspack",
5
5
  "homepage": "https://rspack.rs",
6
6
  "bugs": "https://github.com/rstackjs/rspack-dev-server/issues",
@@ -48,29 +48,30 @@
48
48
  "@rspack/dev-middleware": "^2.0.0",
49
49
  "@types/ws": "^8.18.1",
50
50
  "chokidar": "^5.0.0",
51
- "connect-history-api-fallback": "^2.0.0",
52
- "connect-next": "^4.0.0",
53
- "http-proxy-middleware": "^3.0.5",
51
+ "connect-next": "^4.0.1",
54
52
  "ws": "^8.20.0"
55
53
  },
56
54
  "devDependencies": {
57
55
  "@hono/node-server": "^1.19.12",
58
56
  "@rslib/core": "^0.20.2",
59
- "@rslint/core": "^0.3.3",
57
+ "@rslint/core": "^0.3.4",
60
58
  "@rspack/core": "2.0.0-rc.0",
61
59
  "@rspack/plugin-react-refresh": "1.6.1",
62
60
  "@rstest/core": "^0.9.5",
61
+ "@types/connect-history-api-fallback": "^1.5.4",
63
62
  "@types/mime-types": "3.0.1",
64
63
  "@types/node": "^24.12.0",
65
64
  "@types/serve-static": "^2.2.0",
66
65
  "@types/trusted-types": "^2.0.7",
67
66
  "@types/ws": "8.18.1",
67
+ "connect-history-api-fallback": "^2.0.0",
68
68
  "cross-env": "^10.1.0",
69
69
  "css-loader": "^7.1.4",
70
70
  "express": "^5.2.1",
71
71
  "hono": "^4.12.9",
72
72
  "http-compression": "^1.1.2",
73
73
  "http-proxy": "^1.18.1",
74
+ "http-proxy-middleware": "^3.0.5",
74
75
  "ipaddr.js": "^2.3.0",
75
76
  "launch-editor": "^2.13.2",
76
77
  "nano-staged": "^0.9.0",