Skip to content

Commit

Permalink
fix: async true working with latest react-dev-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jpavon committed Mar 9, 2019
1 parent fa35578 commit ffd8ce9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const getClientEnvironment = require('./env');
const paths = require('./paths');
const { loaders } = require('./webpack.base');

const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');

Expand Down Expand Up @@ -183,7 +183,7 @@ module.exports = {
tslint: paths.appTsLint,
watch: [paths.appSrc],
checkSyntacticErrors: true,
async: false,
async: true,
useTypescriptIncrementalApi: true,
formatter: typescriptFormatter
})
Expand Down
17 changes: 12 additions & 5 deletions scripts/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,21 @@ checkBrowsers(paths.appPath)
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
const appName = require(paths.appPackageJson).name;
const urls = prepareUrls(protocol, HOST, port);
const devSocket = {
warnings: warnings =>
devServer.sockWrite(devServer.sockets, 'warnings', warnings),
errors: errors =>
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,
paths.useYarn
);
useTypeScript: true,
webpack,
});
// Load proxy config
const proxySetting = require(paths.appPackageJson).proxy;
const proxyConfig = prepareProxy(proxySetting, paths.appPublic);
Expand Down

0 comments on commit ffd8ce9

Please sign in to comment.