Skip to content

Commit b801bcc

Browse files
authored
Add TypeScript error formatting (facebook#5529)
1 parent 28e97a7 commit b801bcc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

config/webpack.config.dev.js

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const paths = require('./paths');
2424
const ManifestPlugin = require('webpack-manifest-plugin');
2525
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
2626
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin-alt');
27+
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
2728
// @remove-on-eject-begin
2829
const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier');
2930
// @remove-on-eject-end
@@ -419,6 +420,8 @@ module.exports = {
419420
checkSyntacticErrors: true,
420421
tsconfig: paths.appTsConfig,
421422
watch: paths.appSrc,
423+
silent: true,
424+
formatter: typescriptFormatter,
422425
}),
423426
].filter(Boolean),
424427

config/webpack.config.prod.js

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const paths = require('./paths');
2828
const getClientEnvironment = require('./env');
2929
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
3030
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin-alt');
31+
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
3132
// @remove-on-eject-begin
3233
const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier');
3334
// @remove-on-eject-end
@@ -539,6 +540,8 @@ module.exports = {
539540
checkSyntacticErrors: true,
540541
tsconfig: paths.appTsConfig,
541542
watch: paths.appSrc,
543+
silent: true,
544+
formatter: typescriptFormatter,
542545
}),
543546
].filter(Boolean),
544547
// Some libraries import Node modules but don't use them in the browser.

0 commit comments

Comments
 (0)