Skip to content

Commit bfa39d7

Browse files
authored
Merge pull request #15884 from Microsoft/fix-gulp-tsc-instrumented
Add target and lib references for tsc-instrumented
2 parents 7473dcc + 56d0442 commit bfa39d7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Gulpfile.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ gulp.task(loggedIOJsPath, /*help*/ false, [], (done) => {
935935
const temp = path.join(builtLocalDirectory, "temp");
936936
mkdirP(temp, (err) => {
937937
if (err) { console.error(err); done(err); process.exit(1); }
938-
exec(host, [LKGCompiler, "--types --outdir", temp, loggedIOpath], () => {
938+
exec(host, [LKGCompiler, "--types", "--target es5", "--lib es5", "--outdir", temp, loggedIOpath], () => {
939939
fs.renameSync(path.join(temp, "/harness/loggedIO.js"), loggedIOJsPath);
940940
del(temp).then(() => done(), done);
941941
}, done);
@@ -946,7 +946,13 @@ const instrumenterPath = path.join(harnessDirectory, "instrumenter.ts");
946946
const instrumenterJsPath = path.join(builtLocalDirectory, "instrumenter.js");
947947
gulp.task(instrumenterJsPath, /*help*/ false, [servicesFile], () => {
948948
const settings: tsc.Settings = getCompilerSettings({
949-
outFile: instrumenterJsPath
949+
outFile: instrumenterJsPath,
950+
target: "es5",
951+
lib: [
952+
"es6",
953+
"dom",
954+
"scripthost"
955+
]
950956
}, /*useBuiltCompiler*/ true);
951957
return gulp.src(instrumenterPath)
952958
.pipe(newer(instrumenterJsPath))

0 commit comments

Comments
 (0)