Skip to content

Commit

Permalink
Revert ForkTsCheckerWebpackPlugin changes
Browse files Browse the repository at this point in the history
facebook/create-react-app#10004 makes changes to react-dev-utils
that are not present in the currently released version pulled down by npm. Revert and
reapply once new version of react-dev-utils is released (probably at same time as
create-react-app releases Webpack 5 compatible version).
  • Loading branch information
mbarrien committed Feb 10, 2021
1 parent 095beca commit e34b963
Showing 1 changed file with 25 additions and 36 deletions.
61 changes: 25 additions & 36 deletions src/ts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,46 +623,35 @@ module.exports = function (webpackEnv) {
}),
// TypeScript type checking
useTypeScript &&
new ForkTsCheckerWebpackPlugin({
typescript: {
typescriptPath: resolve.sync('typescript', {
new ForkTsCheckerWebpackPlugin({
typescript: resolve.sync('typescript', {
basedir: paths.appNodeModules,
}),
configOverwrite: {
compilerOptions: {
sourceMap: isEnvProduction
? shouldUseSourceMap
: isEnvDevelopment,
skipLibCheck: true,
inlineSourceMap: false,
declarationMap: false,
noEmit: true,
incremental: true,
},
},
context: paths.appPath,
diagnosticOptions: {
syntactic: true,
},
mode: 'write-references',
// profile: true,
},
issue: {
include: [
async: isEnvDevelopment,
checkSyntacticErrors: true,
resolveModuleNameModule: process.versions.pnp
? `${__dirname}/pnpTs.js`
: undefined,
resolveTypeReferenceDirectiveModule: process.versions.pnp
? `${__dirname}/pnpTs.js`
: undefined,
tsconfig: paths.appTsConfig,
reportFiles: [
// This one is specifically to match during CI tests,
// as micromatch doesn't match
// '../cra-template-typescript/template/src/App.tsx'
// otherwise.
'../**/src/**/*.{ts,tsx}',
'**/src/**/*.{ts,tsx}',
].map(file => ({ file })),
exclude: [
'**/src/**/__tests__/**',
'**/src/**/?(*.)(spec|test).*',
'**/src/setupProxy.*',
'**/src/setupTests.*',
].map(file => ({ file })),
},
logger: {
infrastructure: 'silent',
},
}),
'!**/src/**/__tests__/**',
'!**/src/**/?(*.)(spec|test).*',
'!**/src/setupProxy.*',
'!**/src/setupTests.*',
],
silent: true,
// The formatter is invoked directly in WebpackDevServerUtils during development
formatter: isEnvProduction ? typescriptFormatter : undefined,
}),
// new ESLintPlugin({
// // Plugin options
// extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],
Expand Down

0 comments on commit e34b963

Please sign in to comment.