{ "compilerOptions": { "module": "commonjs", "noImplicitAny": true, "removeComments": true, "preserveConstEnums": true, "outFile": "tsc.js", "sourceMap": true }, "files": [ "Server/server.ts" ] } 

This config, I now need to collect the client but in a separate file

    2 answers 2

    In general, the solution was simple in the Client folder, I put the file

     { "compilerOptions": { "module": "commonjs", "noImplicitAny": true, "removeComments": true, "preserveConstEnums": true, "sourceMap": true, "outFile": "../client.js" }, "files": [ "../Server/server.ts" ], "compileOnSave": true } 

    And in the Server folder also put a file

     { "compilerOptions": { "module": "commonjs", "noImplicitAny": true, "removeComments": true, "preserveConstEnums": true, "sourceMap": true, "outFile": "../server.js" }, "files": [ "server.ts" ], "compileOnSave": true } 

      Try this

       "files": [ "Server/server.ts", "Server/file2.ts" ] 

      View typescript-watcher or gulp-typescript or grunt-typedcript

      With the help of them, you can customize the automatic assembly in a separate folder.