make sure ts-builder instance is being re-used
parent
1ccfebef48
commit
175e81149c
|
@ -51,8 +51,11 @@ function create(projectPath, existingOptions, config, onError = _defaultOnError)
|
|||
}
|
||||
}
|
||||
// FULL COMPILE stream doing transpile, syntax and semantic diagnostics
|
||||
let _builder;
|
||||
function createCompileStream(token) {
|
||||
const _builder = builder.createTypeScriptBuilder({ logFn }, projectPath, cmdLine);
|
||||
if (!_builder) {
|
||||
_builder = builder.createTypeScriptBuilder({ logFn }, projectPath, cmdLine);
|
||||
}
|
||||
return through(function (file) {
|
||||
// give the file to the compiler
|
||||
if (file.isStream()) {
|
||||
|
|
|
@ -73,9 +73,13 @@ export function create(
|
|||
}
|
||||
|
||||
// FULL COMPILE stream doing transpile, syntax and semantic diagnostics
|
||||
|
||||
let _builder!: builder.ITypeScriptBuilder;
|
||||
function createCompileStream(token?: builder.CancellationToken): Readable & Writable {
|
||||
|
||||
const _builder = builder.createTypeScriptBuilder({ logFn }, projectPath, cmdLine);
|
||||
if (!_builder) {
|
||||
_builder = builder.createTypeScriptBuilder({ logFn }, projectPath, cmdLine);
|
||||
}
|
||||
|
||||
return through(function (this: through.ThroughStream, file: Vinyl) {
|
||||
// give the file to the compiler
|
||||
|
|
Loading…
Reference in New Issue