Skip to content

Commit

Permalink
Merge TypeScript configuration with defaults if found (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
fathyb authored and devongovett committed Dec 13, 2017
1 parent b7b2991 commit 8683579
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/assets/TypeScriptAsset.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ class TypeScriptAsset extends JSAsset {
let tsconfig = await config.load(this.name, ['tsconfig.json']);

// Overwrite default if config is found
if (tsconfig) transpilerOptions.compilerOptions = tsconfig.compilerOptions;
if (tsconfig) {
transpilerOptions.compilerOptions = Object.assign(
transpilerOptions.compilerOptions,
tsconfig.compilerOptions
);
}
transpilerOptions.compilerOptions.noEmit = false;

// Transpile Module using TypeScript and parse result as ast format through babylon
Expand Down

0 comments on commit 8683579

Please sign in to comment.