Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use location.port as the client port by default #2850

Merged
merged 1 commit into from
Nov 20, 2020
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
9 changes: 1 addition & 8 deletions lib/utils/DevServerPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,8 @@ class DevServerPlugin {
apply(compiler) {
const { options } = this;

// we're stubbing the app in this method as it's static and doesn't require
// a server to be supplied. createDomain requires an app with the
// address() signature.
/** @type {string} */
const domain = createDomain(options, {
address() {
return { port: options.port };
},
});
const domain = createDomain(options);
/** @type {string} */
const host =
options.client && options.client.host
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/ClientOptions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('sockjs client proxy', () => {
page.waitFor(beforeBrowserCloseDelay).then(() => {
browser.close().then(() => {
expect(requestObj.url()).toContain(
`http://localhost:${port1}/ws`
`http://localhost:${port2}/ws`
);
done();
});
Expand Down
4 changes: 2 additions & 2 deletions test/server/__snapshots__/Server.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Array [
"client",
"default",
"index.js?http:",
"localhost:8100",
"localhost",
],
Array [
"node_modules",
Expand All @@ -26,7 +26,7 @@ Array [
"client",
"default",
"index.js?http:",
"localhost:8100",
"localhost",
],
Array [
"node_modules",
Expand Down