Skip to content

Commit 049ff73

Browse files
committed
fix(webpack-dev-server): fix sockjs url
1 parent 18ad1d3 commit 049ff73

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

bin/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /usr/bin/env node
22

3-
process.env.DEBUG = 'pixore:front-scripts'
3+
process.env.DEBUG = 'pixore:front-scripts, pixore:error'
44

55
const {input} = require('parse-cmd-args')()
66
const debug = require('debug')('pixore:front-scripts')

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
const path = require('path')
33
const fs = require('fs')
4-
const debug = require('debug')('pixore')
4+
const debug = require('debug')('pixore:front-scripts')
55
const debugError = require('debug')('pixore:error')
66
const chalk = require('chalk')
77
const webpack = require('webpack')

src/webpackDevServer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const debug = require('debug')
1+
const debug = require('debug')('pixore:front-scripts')
22
const sockjs = require('sockjs')
33
const path = require('path')
44
const clientStats = { errorDetails: false }
@@ -9,7 +9,7 @@ exports.rewriteListen = Server => {
99
const returnValue = this.listeningApp.listen.apply(this.listeningApp, arguments)
1010
const sockServer = sockjs.createServer({
1111
// Use provided up-to-date sockjs-client
12-
sockjs_url: path.join(PIXORE_PATH, '/__webpack_dev_server__/sockjs.bundle.js'),
12+
sockjs_url: path.join('/', PIXORE_PATH, '/__webpack_dev_server__/sockjs.bundle.js'),
1313
// Limit useless logs
1414
log (severity, line) {
1515
if (severity === 'error') {
@@ -41,7 +41,7 @@ exports.rewriteListen = Server => {
4141
})
4242

4343
sockServer.installHandlers(this.listeningApp, {
44-
prefix: path.join(PIXORE_PATH, '/sockjs-node')
44+
prefix: path.join('/', PIXORE_PATH, '/sockjs-node')
4545
})
4646
return returnValue
4747
}

0 commit comments

Comments
 (0)