Skip to content

Commit b525b7e

Browse files
committed
fix: set WEBPACK_SERVE to string value 'true' (string) (#4718)
1 parent f145b8b commit b525b7e

File tree

3 files changed

+5
-26
lines changed

3 files changed

+5
-26
lines changed

lib/Server.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,7 @@ const schema = require("./options.json");
205205
*/
206206

207207
if (!process.env.WEBPACK_SERVE) {
208-
// TODO fix me in the next major release
209-
// @ts-ignore
210-
process.env.WEBPACK_SERVE = true;
208+
process.env.WEBPACK_SERVE = "true";
211209
}
212210

213211
/**

test/e2e/api.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe("API", () => {
5555

5656
await server.start();
5757

58-
expect(process.env.WEBPACK_SERVE).toBe(true);
58+
expect(process.env.WEBPACK_SERVE).toBe("true");
5959

6060
const response = await page.goto(`http://127.0.0.1:${port}/`, {
6161
waitUntil: "networkidle0",

types/lib/Server.d.ts

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,6 @@ declare class Server {
721721
description: string;
722722
link: string;
723723
};
724-
/**
725-
* @private
726-
* @type {RequestHandler[]}
727-
*/
728724
HistoryApiFallback: {
729725
anyOf: (
730726
| {
@@ -742,11 +738,6 @@ declare class Server {
742738
cli?: undefined;
743739
}
744740
)[];
745-
/**
746-
* @private
747-
* @returns {StatsOptions}
748-
* @constructor
749-
*/
750741
description: string;
751742
link: string;
752743
};
@@ -766,10 +757,6 @@ declare class Server {
766757
}
767758
)[];
768759
};
769-
/**
770-
* @param {string} gateway
771-
* @returns {string | undefined}
772-
*/
773760
Hot: {
774761
anyOf: (
775762
| {
@@ -845,9 +832,6 @@ declare class Server {
845832
description: string;
846833
link: string;
847834
};
848-
/**
849-
* @returns {string}
850-
*/
851835
OpenBoolean: {
852836
type: string;
853837
cli: {
@@ -957,6 +941,7 @@ declare class Server {
957941
};
958942
Proxy: {
959943
type: string;
944+
/** @type {WebSocketURL} */
960945
items: {
961946
anyOf: (
962947
| {
@@ -992,7 +977,7 @@ declare class Server {
992977
type: string;
993978
minLength: number;
994979
cli: {
995-
exclude: boolean;
980+
exclude: boolean /** @type {string} */;
996981
};
997982
};
998983
ServerObject: {
@@ -1236,7 +1221,7 @@ declare class Server {
12361221
}
12371222
)[];
12381223
description: string;
1239-
/** @type {MultiCompiler} */ link: string;
1224+
link: string;
12401225
};
12411226
StaticObject: {
12421227
type: string;
@@ -1271,10 +1256,6 @@ declare class Server {
12711256
description: string;
12721257
link: string;
12731258
};
1274-
/**
1275-
* @private
1276-
* @returns {Promise<void>}
1277-
*/
12781259
serveIndex: {
12791260
anyOf: (
12801261
| {

0 commit comments

Comments
 (0)