@@ -29,8 +29,6 @@ import {
2929 */
3030export function makeAfterCompile (
3131 instance : TSInstance ,
32- addAssets : boolean ,
33- provideErrors : boolean ,
3432 configFilePath : string | undefined
3533) {
3634 let getCompilerOptionDiagnostics = true ;
@@ -47,22 +45,18 @@ export function makeAfterCompile(
4745 }
4846
4947 if ( instance . loaderOptions . transpileOnly ) {
50- if ( addAssets ) {
51- provideAssetsFromSolutionBuilderHost ( instance , compilation ) ;
52- }
48+ provideAssetsFromSolutionBuilderHost ( instance , compilation ) ;
5349 callback ( ) ;
5450 return ;
5551 }
5652 removeCompilationTSLoaderErrors ( compilation , instance . loaderOptions ) ;
5753
58- if ( provideErrors ) {
59- provideCompilerOptionDiagnosticErrorsToWebpack (
60- getCompilerOptionDiagnostics ,
61- compilation ,
62- instance ,
63- configFilePath
64- ) ;
65- }
54+ provideCompilerOptionDiagnosticErrorsToWebpack (
55+ getCompilerOptionDiagnostics ,
56+ compilation ,
57+ instance ,
58+ configFilePath
59+ ) ;
6660 getCompilerOptionDiagnostics = false ;
6761
6862 const modules = determineModules ( compilation , instance ) ;
@@ -74,25 +68,21 @@ export function makeAfterCompile(
7468 checkAllFilesForErrors = false ;
7569
7670 const filesWithErrors : TSFiles = new Map ( ) ;
77- if ( provideErrors ) {
78- provideErrorsToWebpack (
79- filesToCheckForErrors ,
80- filesWithErrors ,
81- compilation ,
82- modules ,
83- instance
84- ) ;
85- provideSolutionErrorsToWebpack ( compilation , modules , instance ) ;
86- }
87- if ( addAssets ) {
88- provideDeclarationFilesToWebpack (
89- filesToCheckForErrors ,
90- instance ,
91- compilation
92- ) ;
93- provideTsBuildInfoFilesToWebpack ( instance , compilation ) ;
94- provideAssetsFromSolutionBuilderHost ( instance , compilation ) ;
95- }
71+ provideErrorsToWebpack (
72+ filesToCheckForErrors ,
73+ filesWithErrors ,
74+ compilation ,
75+ modules ,
76+ instance
77+ ) ;
78+ provideSolutionErrorsToWebpack ( compilation , modules , instance ) ;
79+ provideDeclarationFilesToWebpack (
80+ filesToCheckForErrors ,
81+ instance ,
82+ compilation
83+ ) ;
84+ provideTsBuildInfoFilesToWebpack ( instance , compilation ) ;
85+ provideAssetsFromSolutionBuilderHost ( instance , compilation ) ;
9686
9787 instance . filesWithErrors = filesWithErrors ;
9888 instance . modifiedFiles = undefined ;
0 commit comments