Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions test/e2e/hot-and-live-reload.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const SockJS = require("sockjs-client");
const webpack = require("webpack");
const fs = require("graceful-fs");
const Server = require("../../lib/Server");
const HTMLGeneratorPlugin = require("../helpers/html-generator-plugin");
const reloadConfig = require("../fixtures/reload-config/webpack.config");
const runBrowser = require("../helpers/run-browser");
const port = require("../ports-map")["hot-and-live-reload"];
Expand Down Expand Up @@ -248,7 +249,10 @@ describe("hot and live reload", () => {
`${require.resolve("../../client-src/index.js")}?hot=true`,
require.resolve("../fixtures/reload-config/foo.js"),
],
plugins: [new webpack.HotModuleReplacementPlugin()],
plugins: [
new webpack.HotModuleReplacementPlugin(),
new HTMLGeneratorPlugin(),
],
},
options: {
client: false,
Expand Down Expand Up @@ -461,7 +465,7 @@ describe("hot and live reload", () => {
}
});

await page.goto(`http://localhost:${port}/main${mode.query || ""}`, {
await page.goto(`http://localhost:${port}/${mode.query || ""}`, {
waitUntil: "networkidle0",
});

Expand Down Expand Up @@ -620,7 +624,7 @@ describe("simple hot config HMR plugin", () => {
pageErrors.push(error);
});

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

Expand Down Expand Up @@ -687,7 +691,7 @@ describe("simple hot config HMR plugin with already added HMR plugin", () => {
pageErrors.push(error);
});

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

Expand Down Expand Up @@ -818,7 +822,7 @@ describe("multi compiler hot config HMR plugin", () => {
pageErrors.push(error);
});

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

Expand Down Expand Up @@ -881,7 +885,7 @@ describe("hot disabled HMR plugin", () => {
pageErrors.push(error);
});

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

Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/reload-config/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";

const webpack = require("webpack");
const HTMLGeneratorPlugin = require("../../helpers/html-generator-plugin");

const isWebpack5 = webpack.version.startsWith("5");

Expand Down Expand Up @@ -30,4 +31,5 @@ module.exports = {
: {
level: "info",
},
plugins: [new HTMLGeneratorPlugin()],
};