Skip to content

Commit

Permalink
Convert WebpackDevServerUtils.createCompiler to take in options arg
Browse files Browse the repository at this point in the history
  • Loading branch information
ianschmitz committed Feb 17, 2019
1 parent 7ecde96 commit 007e6fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions packages/react-dev-utils/WebpackDevServerUtils.js
Expand Up @@ -101,15 +101,15 @@ function printInstructions(appName, urls, useYarn) {
console.log();
}

function createCompiler(
webpack,
config,
function createCompiler({
appName,
config,
devSocket,
urls,
useYarn,
useTypeScript,
devSocket
) {
webpack,
}) {
// "Compiler" is a low-level interface to Webpack.
// It lets us listen to some events and provide our own custom messages.
let compiler;
Expand Down
10 changes: 5 additions & 5 deletions packages/react-scripts/scripts/start.js
Expand Up @@ -103,15 +103,15 @@ checkBrowsers(paths.appPath, isInteractive)
devServer.sockWrite(devServer.sockets, 'errors', errors),
};
// Create a webpack compiler that is configured with custom messages.
const compiler = createCompiler(
webpack,
config,
const compiler = createCompiler({
appName,
config,
devSocket,
urls,
useYarn,
useTypeScript,
devSocket
);
webpack,
});
// Load proxy config
const proxySetting = require(paths.appPackageJson).proxy;
const proxyConfig = prepareProxy(proxySetting, paths.appPublic);
Expand Down

0 comments on commit 007e6fd

Please sign in to comment.