在tsconfig.json文件中配置removeComments属性
{ "compilerOptions": { // outDir 用于指定编译后文件所在目录 "outDir": "./dist", // 将编译后文件放在dis目录下 // 是否文件编译后移除注释 "removeComments": true }}
左边是编写的ts文件,右边是编译的js文件,注释被清除了
京公网安备 11010502049817号