Skip to content

Commit ed0050e

Browse files
committed
refactor(server): move new helper to update compiler helper
1 parent 5e94cd4 commit ed0050e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/Server.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ const createDomain = require('./utils/createDomain');
3333
const runBonjour = require('./utils/runBonjour');
3434
const routes = require('./utils/routes');
3535
const getSocketServerImplementation = require('./utils/getSocketServerImplementation');
36-
const setPublicPath = require('./utils/setPublicPath');
3736
const schema = require('./options.json');
3837

3938
// Workaround for node ^8.6.0, ^9.0.0
@@ -60,8 +59,6 @@ class Server {
6059
this.compiler = compiler;
6160
this.options = options;
6261

63-
setPublicPath(compiler, options);
64-
6562
this.log = _log || createLogger(options);
6663

6764
if (this.options.serverMode !== undefined) {

lib/utils/updateCompiler.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
const webpack = require('webpack');
88
const addEntries = require('./addEntries');
99
const getSocketClientPath = require('./getSocketClientPath');
10+
const setPublicPath = require('./setPublicPath');
1011

1112
function updateCompiler(compiler, options) {
13+
setPublicPath(compiler, options);
14+
1215
if (options.inline !== false) {
1316
const findHMRPlugin = (config) => {
1417
if (!config.plugins) {

0 commit comments

Comments
 (0)