Skip to content

Commit 04f3b1a

Browse files
committed
refactor(server): move new helper to update compiler helper
1 parent a2d28ed commit 04f3b1a

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
@@ -31,7 +31,6 @@ const createDomain = require('./utils/createDomain');
3131
const runBonjour = require('./utils/runBonjour');
3232
const routes = require('./utils/routes');
3333
const getSocketServerImplementation = require('./utils/getSocketServerImplementation');
34-
const setPublicPath = require('./utils/setPublicPath');
3534
const schema = require('./options.json');
3635

3736
// 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
// Setup default value
6663
this.options.contentBase =
6764
this.options.contentBase !== undefined

lib/utils/updateCompiler.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
*/
77
const webpack = require('webpack');
88
const addEntries = require('./addEntries');
9+
const setPublicPath = require('./setPublicPath');
910

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

0 commit comments

Comments
 (0)