TypeScript picks up only fraction of files in my lib directory, no idea why

39 views Asked by At

I am having a problem with TS where the tsc compiler is not picking up all the .ts/.js files in my lib directory. It's a very simple problem, not sure why it's happening. tsc is only picking up about 20% of the total number of files. Anybody know why it wouldn't pick up all of them in my lib directory?

I tried both 'classic' and 'node' for moduleResolution, same problem.

I have this tsconfig.json file:

{
  "compilerOptions": {
    "outFile": "dist/suman.js",
    "declaration": true,
    "baseUrl": ".",
    "paths": {
    },
    "types": [
      "node",
      "async",
      "lodash"
    ],
    "typeRoots": [
      "node_modules/@types"
    ],
    "target": "es5",
    "module": "system",
    "moduleResolution": "classic",
    "noImplicitAny": true,
    "removeComments": true,
    "allowUnreachableCode": true,
    "lib": [
      "es2015",
      "es2016",
      "es2017",
      "dom"
    ]
  },
  "allowJs": true,
  "compileOnSave": false,
  "include": [
    "lib/**/*"
  ],
  "exclude": [
    "test",
    "node_modules",
    "dist"
  ]
}

Using this command:

tsc --project tsconfig.json

I have the following output in

dist/suman.js

here is the output:

System.register("freeze-existing", [], function (exports_1, context_1) {
    'use strict';
    var __moduleName = context_1 && context_1.id;
    return {
        setters: [],
        execute: function () {
        }
    };
});
// ..... more files...more files...
System.register("test-suite-methods/make-it", [], function (exports_12, context_12) {
    'use strict';
    var __moduleName = context_12 && context_12.id;
    function handleBadOptions(opts) {
    }
    var domain, util, pragmatik, _, async, colors, rules, constants, incr, handleSetupComplete;
    return {
        setters: [],
        execute: function () {
            domain = require('domain');
            util = require('util');
            pragmatik = require('pragmatik');
            _ = require('underscore');
            async = require('async');
            colors = require('colors/safe');
            rules = require('../helpers/handle-varargs');
            constants = require('../../config/suman-constants');
            incr = require('../incrementer');
            handleSetupComplete = require('../handle-setup-complete');
        }
    };
});
0

There are 0 answers