@@ -82,6 +82,7 @@ function createChecker(receive: (cb: (msg: Req) => void) => void, send: (msg: Re
82
82
let ignoreDiagnostics : { [ id : number ] : boolean } = { } ;
83
83
let instanceName : string ;
84
84
let context : string ;
85
+ let getCustomTransformers : ( ) => ts . CustomTransformers | undefined ;
85
86
86
87
function ensureFile ( fileName : string ) {
87
88
if ( ! files [ fileName ] ) {
@@ -136,6 +137,7 @@ function createChecker(receive: (cb: (msg: Req) => void) => void, send: (msg: Re
136
137
137
138
class Host implements ts . LanguageServiceHost {
138
139
filesRegex : RegExp ;
140
+ getCustomTransformers = getCustomTransformers ;
139
141
140
142
constructor ( filesRegex : RegExp ) {
141
143
this . filesRegex = filesRegex ;
@@ -231,13 +233,17 @@ function createChecker(receive: (cb: (msg: Req) => void) => void, send: (msg: Re
231
233
directoryExists ( path : string ) {
232
234
return compiler . sys . directoryExists ( path ) ;
233
235
}
234
- getCustomTransformers = loaderConfig . getCustomTransformers
235
236
}
236
237
237
238
function processInit ( { seq, payload} : Init . Request ) {
238
239
compiler = require ( payload . compilerInfo . compilerPath ) ;
239
240
compilerInfo = payload . compilerInfo ;
240
241
loaderConfig = payload . loaderConfig ;
242
+
243
+ if ( loaderConfig . customTranformersPath !== undefined ) {
244
+ getCustomTransformers = require ( loaderConfig . customTranformersPath )
245
+ }
246
+
241
247
compilerConfig = payload . compilerConfig ;
242
248
compilerOptions = compilerConfig . options ;
243
249
webpackOptions = payload . webpackOptions ;
0 commit comments