ToddThomson / tsproject

Typescript minifier and modular typescript bundle optimizer for gulp (Ts Vinyl Adapter).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tsconfig.json/compilerOptions/outDir causes the bundled js to not be output

jeckhart opened this issue · comments

For example:

tsconfig.json:

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es5",
    "noResolve": false,
    "noImplicitAny": false,
    "diagnostics": true,
    "listFiles": true,
    "outDir": "dist"
  },
  "bundles": {
    "main": {
      "files": [
        "./src/boot/main.ts"
      ]
  }
}

In this case, a main.ts is generated, but no main.js or main.d.ts

@jeckhart The outDir compilerOption for Typescript does not need to be used. Please use the outDir bundle option instead.

@ToddThomson The problem is that you'll end up with compiled .js and .d.ts files in the source directory if you don't specificy outDir in compilerOptions

edit: oops you're right. Instead of configuring outDir in tsconfig.json, gulp.dest('dist') should be used. Not sure how i ended up doing a gulp.dest('./') to start with.. My apologies.

@jeckhart @WHUsoft The bundle config options also has an "outDir" setting.