@rspack/dev-server 0.0.0-20230130020622 → 0.0.0-20230204135256
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 +14 -5
- package/dist/config.d.ts +19 -28
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -143
- package/dist/config.js.map +1 -1
- package/dist/server.d.ts +10 -15
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +105 -224
- package/dist/server.js.map +1 -1
- package/jest.config.js +3 -1
- package/package.json +6 -6
- package/src/config.ts +20 -180
- package/src/server.ts +120 -255
- package/tests/__snapshots__/normalizeOptions.test.ts.snap +177 -17
- package/tests/e2e/hot-reaload.test.ts +12 -109
- package/tests/e2e-fixtures/react/node_modules/react/LICENSE +21 -0
- package/tests/e2e-fixtures/react/node_modules/react/README.md +37 -0
- package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-dev-runtime.development.js +1296 -0
- package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js +10 -0
- package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js +10 -0
- package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-runtime.development.js +1314 -0
- package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-runtime.production.min.js +11 -0
- package/tests/e2e-fixtures/react/node_modules/react/cjs/react-jsx-runtime.profiling.min.js +11 -0
- package/tests/e2e-fixtures/react/node_modules/react/cjs/react.development.js +2739 -0
- package/tests/e2e-fixtures/react/node_modules/react/cjs/react.production.min.js +26 -0
- package/tests/e2e-fixtures/react/node_modules/react/cjs/react.shared-subset.development.js +20 -0
- package/tests/e2e-fixtures/react/node_modules/react/cjs/react.shared-subset.production.min.js +10 -0
- package/tests/e2e-fixtures/react/node_modules/react/index.js +7 -0
- package/tests/e2e-fixtures/react/node_modules/react/jsx-dev-runtime.js +7 -0
- package/tests/e2e-fixtures/react/node_modules/react/jsx-runtime.js +7 -0
- package/tests/e2e-fixtures/react/node_modules/react/package.json +47 -0
- package/tests/e2e-fixtures/react/node_modules/react/react.shared-subset.js +7 -0
- package/tests/e2e-fixtures/react/node_modules/react/umd/react.development.js +3342 -0
- package/tests/e2e-fixtures/react/node_modules/react/umd/react.production.min.js +31 -0
- package/tests/e2e-fixtures/react/node_modules/react/umd/react.profiling.min.js +31 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/LICENSE +21 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/README.md +60 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +7018 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +93 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js +7078 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.min.js +101 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server.browser.development.js +7003 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js +96 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server.node.development.js +7059 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-server.node.production.min.js +102 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-test-utils.development.js +1741 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js +40 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom.development.js +29868 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom.production.min.js +323 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/cjs/react-dom.profiling.min.js +367 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/client.js +25 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/index.js +38 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/package.json +62 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/profiling.js +38 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/server.browser.js +17 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/server.js +3 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/server.node.js +17 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/test-utils.js +7 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-server-legacy.browser.development.js +7015 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-server-legacy.browser.production.min.js +75 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-server.browser.development.js +7000 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-server.browser.production.min.js +76 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-test-utils.development.js +1737 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom-test-utils.production.min.js +33 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom.development.js +29869 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom.production.min.js +267 -0
- package/tests/e2e-fixtures/react/node_modules/react-dom/umd/react-dom.profiling.min.js +285 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/LICENSE +21 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/README.md +9 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js +700 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js +20 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler-unstable_post_task.development.js +207 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler-unstable_post_task.production.min.js +14 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler.development.js +634 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/cjs/scheduler.production.min.js +19 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/index.js +7 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/package.json +36 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/umd/scheduler-unstable_mock.development.js +699 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js +19 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/umd/scheduler.development.js +152 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/umd/scheduler.production.min.js +146 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/umd/scheduler.profiling.min.js +146 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/unstable_mock.js +7 -0
- package/tests/e2e-fixtures/react/node_modules/scheduler/unstable_post_task.js +7 -0
- package/tests/e2e-fixtures/react/package.json +2 -0
- package/tests/e2e-fixtures/react/webpack.config.js +6 -2
- package/tests/normalizeOptions.test.ts +70 -16
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,31 +1,40 @@
|
|
|
1
1
|
# rspack-dev-server
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20230204135256
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- 59edc2cb: fix watch options
|
|
8
|
+
- ac02a096: fix: getRspackMemoryAssets failed to get index.html when request path is /
|
|
9
|
+
feat: extends webpack-dev-server
|
|
8
10
|
- 290bf7fb: feat: add devServer.historyApiFallback options
|
|
11
|
+
- Updated dependencies [361f9a53]
|
|
12
|
+
- Updated dependencies [ce31cd02]
|
|
9
13
|
- Updated dependencies [59edc2cb]
|
|
10
14
|
- Updated dependencies [b77074df]
|
|
11
15
|
- Updated dependencies [c65ca69e]
|
|
12
16
|
- Updated dependencies [4de9eea6]
|
|
17
|
+
- Updated dependencies [0bc720c7]
|
|
18
|
+
- Updated dependencies [ac02a096]
|
|
13
19
|
- Updated dependencies [8a4cb9a3]
|
|
14
20
|
- Updated dependencies [9c90398a]
|
|
15
21
|
- Updated dependencies [290bf7fb]
|
|
16
22
|
- Updated dependencies [86ed1218]
|
|
23
|
+
- Updated dependencies [126b2160]
|
|
17
24
|
- Updated dependencies [792304dd]
|
|
18
25
|
- Updated dependencies [6d4f3e62]
|
|
19
26
|
- Updated dependencies [3fcfa746]
|
|
20
27
|
- Updated dependencies [cb93bb42]
|
|
28
|
+
- Updated dependencies [6b95cf27]
|
|
21
29
|
- Updated dependencies [2f4db99e]
|
|
30
|
+
- Updated dependencies [82ae10ca]
|
|
22
31
|
- Updated dependencies [5e722adf]
|
|
23
32
|
- Updated dependencies [0269ff40]
|
|
24
33
|
- Updated dependencies [70586d79]
|
|
25
|
-
- @rspack/core@0.0.0-
|
|
26
|
-
- @rspack/dev-
|
|
27
|
-
- @rspack/dev-
|
|
28
|
-
- @rspack/dev-server@0.0.0-
|
|
34
|
+
- @rspack/core@0.0.0-20230204135256
|
|
35
|
+
- @rspack/dev-middleware@0.0.0-20230204135256
|
|
36
|
+
- @rspack/dev-client@0.0.0-20230204135256
|
|
37
|
+
- @rspack/dev-server@0.0.0-20230204135256
|
|
29
38
|
|
|
30
39
|
## 0.0.21
|
|
31
40
|
|
package/dist/config.d.ts
CHANGED
|
@@ -1,33 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare type WebSocketServerConfiguration = false | {
|
|
6
|
-
type: "sockjs" | "ws" | string | Function;
|
|
7
|
-
options: {
|
|
8
|
-
protocol?: string;
|
|
9
|
-
host?: string;
|
|
10
|
-
port?: number;
|
|
11
|
-
prefix?: string;
|
|
12
|
-
path?: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export interface ResolvedDev {
|
|
16
|
-
host: string;
|
|
1
|
+
import WebpackDevServer from "webpack-dev-server";
|
|
2
|
+
import type { DevServer } from "@rspack/core";
|
|
3
|
+
export type { DevServer };
|
|
4
|
+
export interface ResolvedDevServer extends DevServer {
|
|
17
5
|
port: number | string;
|
|
18
|
-
static:
|
|
19
|
-
|
|
20
|
-
watch: false | WatchOptions;
|
|
21
|
-
};
|
|
22
|
-
devMiddleware: {};
|
|
6
|
+
static: false | Array<WebpackDevServer.NormalizedStatic>;
|
|
7
|
+
devMiddleware: DevServer["devMiddleware"];
|
|
23
8
|
hot: boolean;
|
|
24
|
-
open:
|
|
9
|
+
open: WebpackDevServer.Open[];
|
|
10
|
+
magicHtml: boolean;
|
|
25
11
|
liveReload: boolean;
|
|
26
|
-
webSocketServer: WebSocketServerConfiguration;
|
|
27
|
-
proxy:
|
|
28
|
-
client:
|
|
29
|
-
|
|
12
|
+
webSocketServer: false | WebpackDevServer.WebSocketServerConfiguration;
|
|
13
|
+
proxy: WebpackDevServer.ProxyConfigArray;
|
|
14
|
+
client: WebpackDevServer.Configuration["client"];
|
|
15
|
+
allowedHosts: "auto" | string[] | "all";
|
|
16
|
+
bonjour: false | Record<string, never> | WebpackDevServer.BonjourOptions;
|
|
17
|
+
compress: boolean;
|
|
18
|
+
historyApiFallback: false | WebpackDevServer.ConnectHistoryApiFallbackOptions;
|
|
19
|
+
server: WebpackDevServer.ServerConfiguration;
|
|
20
|
+
ipc: string | undefined;
|
|
21
|
+
setupExitSignals: boolean;
|
|
22
|
+
watchFiles: WebpackDevServer.WatchFiles[];
|
|
30
23
|
}
|
|
31
|
-
export declare function resolveDevOptions(options: Dev, compilerOptions: RspackOptionsNormalized): ResolvedDev;
|
|
32
|
-
export {};
|
|
33
24
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IACnD,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACzD,aAAa,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;IAE1C,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,gBAAgB,CAAC,IAAI,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,KAAK,GAAG,gBAAgB,CAAC,4BAA4B,CAAC;IACvE,KAAK,EAAE,gBAAgB,CAAC,gBAAgB,CAAC;IACzC,MAAM,EAAE,gBAAgB,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjD,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;IACxC,OAAO,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,gBAAgB,CAAC,cAAc,CAAC;IACzE,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAE,KAAK,GAAG,gBAAgB,CAAC,gCAAgC,CAAC;IAC9E,MAAM,EAAE,gBAAgB,CAAC,mBAAmB,CAAC;IAC7C,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,gBAAgB,CAAC,UAAU,EAAE,CAAC;CAC1C"}
|
package/dist/config.js
CHANGED
|
@@ -1,146 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.resolveDevOptions = void 0;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
function resolveStaticWatchOptions(watch = {}) {
|
|
9
|
-
var _a;
|
|
10
|
-
const ignored = (_a = watch.ignored) !== null && _a !== void 0 ? _a : [
|
|
11
|
-
"**/dist/**",
|
|
12
|
-
"**/node_modules/**",
|
|
13
|
-
"**/.git/**"
|
|
14
|
-
];
|
|
15
|
-
return {
|
|
16
|
-
...watch,
|
|
17
|
-
ignored
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function resolveDevOptions(options, compilerOptions) {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
22
|
-
const open = true;
|
|
23
|
-
const proxy = options.proxy;
|
|
24
|
-
const hot = (_a = options.hot) !== null && _a !== void 0 ? _a : true;
|
|
25
|
-
// --- static
|
|
26
|
-
const directory = (_c = (_b = options.static) === null || _b === void 0 ? void 0 : _b.directory) !== null && _c !== void 0 ? _c : path_1.default.resolve(compilerOptions.context, compilerOptions.output.path);
|
|
27
|
-
let watch = {};
|
|
28
|
-
if (((_d = options.static) === null || _d === void 0 ? void 0 : _d.watch) === false) {
|
|
29
|
-
watch = false;
|
|
30
|
-
}
|
|
31
|
-
else if (((_e = options.static) === null || _e === void 0 ? void 0 : _e.watch) === true) {
|
|
32
|
-
watch = resolveStaticWatchOptions({});
|
|
33
|
-
}
|
|
34
|
-
else if ((_f = options.static) === null || _f === void 0 ? void 0 : _f.watch) {
|
|
35
|
-
watch = (_g = options.static) === null || _g === void 0 ? void 0 : _g.watch;
|
|
36
|
-
}
|
|
37
|
-
// ---
|
|
38
|
-
const devMiddleware = (_h = options.devMiddleware) !== null && _h !== void 0 ? _h : {};
|
|
39
|
-
const liveReload = (_j = options.liveReload) !== null && _j !== void 0 ? _j : true;
|
|
40
|
-
if (typeof options.client === "undefined" ||
|
|
41
|
-
(typeof options.client === "object" && options.client !== null)) {
|
|
42
|
-
if (!options.client) {
|
|
43
|
-
options.client = {};
|
|
44
|
-
}
|
|
45
|
-
if (typeof options.client.webSocketURL === "undefined") {
|
|
46
|
-
options.client.webSocketURL = {};
|
|
47
|
-
}
|
|
48
|
-
else if (typeof options.client.webSocketURL === "string") {
|
|
49
|
-
const parsedURL = new URL(options.client.webSocketURL);
|
|
50
|
-
options.client.webSocketURL = {
|
|
51
|
-
protocol: parsedURL.protocol,
|
|
52
|
-
hostname: parsedURL.hostname,
|
|
53
|
-
port: parsedURL.port.length > 0 ? Number(parsedURL.port) : "",
|
|
54
|
-
pathname: parsedURL.pathname,
|
|
55
|
-
username: parsedURL.username,
|
|
56
|
-
password: parsedURL.password
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
else if (typeof options.client.webSocketURL.port === "string") {
|
|
60
|
-
options.client.webSocketURL.port = Number(options.client.webSocketURL.port);
|
|
61
|
-
}
|
|
62
|
-
// Enable client overlay by default
|
|
63
|
-
if (typeof options.client.overlay === "undefined") {
|
|
64
|
-
options.client.overlay = true;
|
|
65
|
-
}
|
|
66
|
-
else if (typeof options.client.overlay !== "boolean") {
|
|
67
|
-
options.client.overlay = {
|
|
68
|
-
errors: true,
|
|
69
|
-
warnings: true,
|
|
70
|
-
...options.client.overlay
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
if (typeof options.client.reconnect === "undefined") {
|
|
74
|
-
options.client.reconnect = 10;
|
|
75
|
-
}
|
|
76
|
-
else if (options.client.reconnect === true) {
|
|
77
|
-
options.client.reconnect = Infinity;
|
|
78
|
-
}
|
|
79
|
-
else if (options.client.reconnect === false) {
|
|
80
|
-
options.client.reconnect = 0;
|
|
81
|
-
}
|
|
82
|
-
// Respect infrastructureLogging.level
|
|
83
|
-
if (typeof options.client.logging === "undefined") {
|
|
84
|
-
options.client.logging = compilerOptions.infrastructureLogging
|
|
85
|
-
? compilerOptions.infrastructureLogging.level
|
|
86
|
-
: "info";
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
const defaultWebSocketServerType = "ws";
|
|
90
|
-
const defaultWebSocketServerOptions = { path: "/ws" };
|
|
91
|
-
let webSocketServer;
|
|
92
|
-
if (typeof options.webSocketServer === "undefined") {
|
|
93
|
-
webSocketServer = {
|
|
94
|
-
type: defaultWebSocketServerType,
|
|
95
|
-
options: defaultWebSocketServerOptions
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
else if (typeof options.webSocketServer === "boolean" &&
|
|
99
|
-
!options.webSocketServer) {
|
|
100
|
-
webSocketServer = false;
|
|
101
|
-
}
|
|
102
|
-
else if (typeof options.webSocketServer === "string" ||
|
|
103
|
-
typeof options.webSocketServer === "function") {
|
|
104
|
-
webSocketServer = {
|
|
105
|
-
type: options.webSocketServer,
|
|
106
|
-
options: defaultWebSocketServerOptions
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
const { port } = options.webSocketServer.options;
|
|
111
|
-
webSocketServer = {
|
|
112
|
-
type: options.webSocketServer.type || defaultWebSocketServerType,
|
|
113
|
-
options: {
|
|
114
|
-
...defaultWebSocketServerOptions,
|
|
115
|
-
...options.webSocketServer.options,
|
|
116
|
-
port: typeof port === "string" ? Number(port) : port
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
let historyApiFallback;
|
|
121
|
-
if (typeof options.historyApiFallback === "undefined") {
|
|
122
|
-
historyApiFallback = false;
|
|
123
|
-
}
|
|
124
|
-
else if (typeof options.historyApiFallback === "boolean" &&
|
|
125
|
-
options.historyApiFallback) {
|
|
126
|
-
historyApiFallback = {};
|
|
127
|
-
}
|
|
128
|
-
return {
|
|
129
|
-
host: options.host,
|
|
130
|
-
port: options.port ? Number(options.port) : undefined,
|
|
131
|
-
static: {
|
|
132
|
-
directory,
|
|
133
|
-
watch
|
|
134
|
-
},
|
|
135
|
-
devMiddleware,
|
|
136
|
-
open,
|
|
137
|
-
hot,
|
|
138
|
-
liveReload,
|
|
139
|
-
webSocketServer,
|
|
140
|
-
proxy,
|
|
141
|
-
client: options.client,
|
|
142
|
-
historyApiFallback
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
exports.resolveDevOptions = resolveDevOptions;
|
|
146
3
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":""}
|
package/dist/server.d.ts
CHANGED
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
import
|
|
3
|
+
import { Compiler, MultiCompiler } from "@rspack/core";
|
|
4
4
|
import type { Socket } from "net";
|
|
5
5
|
import type { FSWatcher, WatchOptions } from "chokidar";
|
|
6
6
|
import type { Server } from "http";
|
|
7
|
-
import type { ResolvedDev } from "./config";
|
|
8
7
|
import WebpackDevServer from "webpack-dev-server";
|
|
8
|
+
import type { ResolvedDevServer, DevServer } from "./config";
|
|
9
9
|
export declare class RspackDevServer extends WebpackDevServer {
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* resolved after `normalizedOptions`
|
|
12
|
+
*/
|
|
13
|
+
options: ResolvedDevServer;
|
|
11
14
|
staticWatchers: FSWatcher[];
|
|
12
15
|
sockets: Socket[];
|
|
13
16
|
server: Server;
|
|
14
|
-
|
|
15
|
-
compiler: Compiler;
|
|
17
|
+
compiler: Compiler | MultiCompiler;
|
|
16
18
|
webSocketServer: WebpackDevServer.WebSocketServerImplementation | undefined;
|
|
17
|
-
constructor(compiler: Compiler);
|
|
18
|
-
|
|
19
|
-
rewriteCompilerOptions(): void;
|
|
20
|
-
addAdditionEntires(): void;
|
|
21
|
-
static findCacheDir(): string;
|
|
19
|
+
constructor(options: DevServer, compiler: Compiler | MultiCompiler);
|
|
20
|
+
addAdditionEntires(compiler: Compiler): void;
|
|
22
21
|
watchFiles(watchPath: string | string[], watchOptions?: WatchOptions): void;
|
|
23
22
|
getClientTransport(): string;
|
|
24
|
-
|
|
25
|
-
stop(): Promise<void>;
|
|
26
|
-
private setupApp;
|
|
27
|
-
private setupWatchStaticFiles;
|
|
23
|
+
initialize(): Promise<void>;
|
|
28
24
|
private setupDevMiddleware;
|
|
29
25
|
private setupMiddlewares;
|
|
30
|
-
private createServer;
|
|
31
26
|
private setupHooks;
|
|
32
27
|
}
|
|
33
28
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE7D,qBAAa,eAAgB,SAAQ,gBAAgB;IACpD;;OAEG;IACH,OAAO,EAAE,iBAAiB,CAAC;IAC3B,cAAc,EAAE,SAAS,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IAER,QAAQ,EAAE,QAAQ,GAAG,aAAa,CAAC;IAC1C,eAAe,EAAE,gBAAgB,CAAC,6BAA6B,GAAG,SAAS,CAAC;gBAEhE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,aAAa;IAKlE,kBAAkB,CAAC,QAAQ,EAAE,QAAQ;IA0BrC,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI;IAyB3E,kBAAkB,IAAI,MAAM;IAmEtB,UAAU;IAqFhB,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,gBAAgB;IA2DxB,OAAO,CAAC,UAAU;CAQlB"}
|