diff --git a/lib/broccoli/angular2-app.js b/lib/broccoli/angular2-app.js index e9a875497af3..6839fe9db789 100644 --- a/lib/broccoli/angular2-app.js +++ b/lib/broccoli/angular2-app.js @@ -27,7 +27,9 @@ class Angular2App extends BroccoliPlugin { options = options || {}; this._options = options; - this._sourceDir = ngConfig.defaults.sourceDir || 'src'; + this._sourceDir = options.sourceDir + || (ngConfig.defaults && ngConfig.defaults.sourceDir) + || 'src'; this._inputNode = inputNode || this._buildInputTree(); this._destDir = options.destDir || ''; diff --git a/lib/broccoli/broccoli-typescript.js b/lib/broccoli/broccoli-typescript.js index 2127625380fc..a8df2d04acc5 100644 --- a/lib/broccoli/broccoli-typescript.js +++ b/lib/broccoli/broccoli-typescript.js @@ -159,9 +159,7 @@ class BroccoliTypeScriptCompiler extends Plugin { this._tsConfigFiles = tsconfig.files.splice(0); - // the conversion is a bit awkward, see https://github.com/Microsoft/TypeScript/issues/5276 - // in 1.8 use convertCompilerOptionsFromJson - this._tsOpts = ts.parseJsonConfigFileContent(tsconfig, null, null).options; + this._tsOpts = ts.convertCompilerOptionsFromJson(tsconfig, '', null).options; this._tsOpts.rootDir = ''; this._tsOpts.outDir = '';