@@ -29,8 +29,6 @@ import {
29
29
*/
30
30
export function makeAfterCompile (
31
31
instance : TSInstance ,
32
- addAssets : boolean ,
33
- provideErrors : boolean ,
34
32
configFilePath : string | undefined
35
33
) {
36
34
let getCompilerOptionDiagnostics = true ;
@@ -47,22 +45,18 @@ export function makeAfterCompile(
47
45
}
48
46
49
47
if ( instance . loaderOptions . transpileOnly ) {
50
- if ( addAssets ) {
51
- provideAssetsFromSolutionBuilderHost ( instance , compilation ) ;
52
- }
48
+ provideAssetsFromSolutionBuilderHost ( instance , compilation ) ;
53
49
callback ( ) ;
54
50
return ;
55
51
}
56
52
removeCompilationTSLoaderErrors ( compilation , instance . loaderOptions ) ;
57
53
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
+ ) ;
66
60
getCompilerOptionDiagnostics = false ;
67
61
68
62
const modules = determineModules ( compilation , instance ) ;
@@ -74,25 +68,21 @@ export function makeAfterCompile(
74
68
checkAllFilesForErrors = false ;
75
69
76
70
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 ) ;
96
86
97
87
instance . filesWithErrors = filesWithErrors ;
98
88
instance . modifiedFiles = undefined ;
0 commit comments