Skip to content

Commit 5c7a3d0

Browse files
authored
Keep comments in production tsserverlibrary builds (#18913)
1 parent b111493 commit 5c7a3d0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Gulpfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ const tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js")
505505
const tsserverLibraryDefinitionFile = path.join(builtLocalDirectory, "tsserverlibrary.d.ts");
506506

507507
gulp.task(tsserverLibraryFile, /*help*/ false, [servicesFile, typesMapJson], (done) => {
508-
const serverLibraryProject = tsc.createProject("src/server/tsconfig.library.json", getCompilerSettings({}, /*useBuiltCompiler*/ true));
508+
const serverLibraryProject = tsc.createProject("src/server/tsconfig.library.json", getCompilerSettings({ removeComments: false }, /*useBuiltCompiler*/ true));
509509
const {js, dts}: { js: NodeJS.ReadableStream, dts: NodeJS.ReadableStream } = serverLibraryProject.src()
510510
.pipe(sourcemaps.init())
511511
.pipe(newer(tsserverLibraryFile))

Jakefile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ compileFile(
647647
[builtLocalDirectory, copyright, builtLocalCompiler].concat(languageServiceLibrarySources).concat(libraryTargets),
648648
/*prefixes*/[copyright],
649649
/*useBuiltCompiler*/ true,
650-
{ noOutFile: false, generateDeclarations: true, stripInternal: true, preserveConstEnums: true },
650+
{ noOutFile: false, generateDeclarations: true, stripInternal: true, preserveConstEnums: true, keepComments: true },
651651
/*callback*/ function () {
652652
prependFile(copyright, tsserverLibraryDefinitionFile);
653653

0 commit comments

Comments
 (0)