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

2.7.0 rollback #1023

Merged
merged 2 commits into from
Aug 8, 2017
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
10 changes: 1 addition & 9 deletions client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,12 @@ if(hostname && (self.location.protocol === "https:" || urlParts.hostname === "0.
protocol = self.location.protocol;
}

var rootPathName = url.parse(__webpack_public_path__).pathname || ""; // eslint-disable-line no-undef

if(rootPathName.length > 1) {
rootPathName = rootPathName.replace(/\/+$/, "");
}

var sockjsPath = rootPathName + "/sockjs-node";

var socketUrl = url.format({
protocol: protocol,
auth: urlParts.auth,
hostname: hostname,
port: (urlParts.port === "0") ? self.location.port : urlParts.port,
pathname: urlParts.path == null || urlParts.path === "/" ? sockjsPath : urlParts.path
pathname: urlParts.path == null || urlParts.path === "/" ? "/sockjs-node" : urlParts.path
});

socket(socketUrl, onSocketMsg);
Expand Down
15 changes: 0 additions & 15 deletions examples/node-api-sockjs-prefix/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions examples/node-api-sockjs-prefix/app.js

This file was deleted.

9 changes: 0 additions & 9 deletions examples/node-api-sockjs-prefix/index.html

This file was deleted.

25 changes: 0 additions & 25 deletions examples/node-api-sockjs-prefix/server.js

This file was deleted.

8 changes: 0 additions & 8 deletions examples/node-api-sockjs-prefix/webpack.config.js

This file was deleted.

3 changes: 1 addition & 2 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ function Server(compiler, options) {
this.disableHostCheck = !!options.disableHostCheck;
this.publicHost = options.public;
this.allowedHosts = options.allowedHosts;
this.sockjsPrefix = options.sockjsPrefix || ""
this.sockets = [];
this.contentBaseWatchers = [];

Expand Down Expand Up @@ -521,7 +520,7 @@ Server.prototype.listen = function(port, hostname) {
});

sockServer.installHandlers(this.listeningApp, {
prefix: `${this.sockjsPrefix}/sockjs-node`
prefix: "/sockjs-node"
});
return returnValue;
}
Expand Down
4 changes: 0 additions & 4 deletions lib/optionsSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@
}
]
},
"sockjsPrefix": {
"description": "Optional prefix for the sockjs handler to be mounted to.",
"type": "string"
},
"socket": {
"description": "The Unix socket to listen to (instead of on a host).",
"type": "string"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webpack-dev-server",
"version": "2.7.0",
"version": "2.6.1",
"author": "Tobias Koppers @sokra",
"description": "Serves a webpack app. Updates the browser on changes.",
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion test/Validation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("Validation", function() {
config: { asdf: true },
message: [
" - configuration has an unknown property 'asdf'. These properties are valid:",
" object { hot?, hotOnly?, lazy?, bonjour?, host?, allowedHosts?, filename?, publicPath?, port?, sockjsPrefix?, socket?, " +
" object { hot?, hotOnly?, lazy?, bonjour?, host?, allowedHosts?, filename?, publicPath?, port?, socket?, " +
"watchOptions?, headers?, clientLogLevel?, overlay?, key?, cert?, ca?, pfx?, pfxPassphrase?, " +
"inline?, disableHostCheck?, public?, https?, contentBase?, watchContentBase?, open?, useLocalIp?, openPage?, features?, " +
"compress?, proxy?, historyApiFallback?, staticOptions?, setup?, stats?, reporter?, " +
Expand Down