webpack: Fix webpack-dev-server to not inline serve bad sockjs url.

Fixes #5118.
This commit is contained in:
Pweaver (Paul Weaver) 2017-05-31 00:58:01 -04:00 committed by Tim Abbott
parent 5d794d08dd
commit 2efecd4809
2 changed files with 3 additions and 2 deletions

View File

@ -379,8 +379,8 @@ class Application(web.Application):
(r"/json/events.*", TornadoHandler),
(r"/api/v1/events.*", TornadoHandler),
(r"/webpack.*", WebPackHandler),
(r"/sockjs-node.*", WebPackHandler),
(r"/sockjs.*", TornadoHandler),
(r"/socket.io.*", WebPackHandler),
(r"/.*", DjangoHandler)
]
super(Application, self).__init__(handlers, enable_logging=enable_logging)

View File

@ -1,13 +1,14 @@
var config = require('./webpack.config.js');
var BundleTracker = require('webpack-bundle-tracker');
config.entry.translations.push('webpack-dev-server/client?/socket.io');
config.entry.translations.unshift('webpack-dev-server/client?sockjs-node');
config.devtool = 'eval';
config.output.publicPath = '/webpack/';
config.plugins.push(new BundleTracker({filename: 'static/webpack-bundles/webpack-stats-dev.json'}));
config.devServer = {
port: 9994,
inline: false,
stats: "errors-only",
watchOptions: {
aggregateTimeout: 300,