Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 007e6fd

Browse files
committedFeb 17, 2019
Convert WebpackDevServerUtils.createCompiler to take in options arg
1 parent 7ecde96 commit 007e6fd

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed
 

‎packages/react-dev-utils/WebpackDevServerUtils.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ function printInstructions(appName, urls, useYarn) {
101101
console.log();
102102
}
103103

104-
function createCompiler(
105-
webpack,
106-
config,
104+
function createCompiler({
107105
appName,
106+
config,
107+
devSocket,
108108
urls,
109109
useYarn,
110110
useTypeScript,
111-
devSocket
112-
) {
111+
webpack,
112+
}) {
113113
// "Compiler" is a low-level interface to Webpack.
114114
// It lets us listen to some events and provide our own custom messages.
115115
let compiler;

‎packages/react-scripts/scripts/start.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ checkBrowsers(paths.appPath, isInteractive)
103103
devServer.sockWrite(devServer.sockets, 'errors', errors),
104104
};
105105
// Create a webpack compiler that is configured with custom messages.
106-
const compiler = createCompiler(
107-
webpack,
108-
config,
106+
const compiler = createCompiler({
109107
appName,
108+
config,
109+
devSocket,
110110
urls,
111111
useYarn,
112112
useTypeScript,
113-
devSocket
114-
);
113+
webpack,
114+
});
115115
// Load proxy config
116116
const proxySetting = require(paths.appPackageJson).proxy;
117117
const proxyConfig = prepareProxy(proxySetting, paths.appPublic);

0 commit comments

Comments
 (0)
Please sign in to comment.