Skip to content

Commit 67c7b92

Browse files
committed
refactor(@angular/cli): cleanup leftover tsconfig reading logic
Followup to angular#7937
1 parent 46530b9 commit 67c7b92

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

packages/@angular/cli/models/webpack-configs/common.ts

-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
157157
extraPlugins.push(new NamedLazyChunksWebpackPlugin());
158158
}
159159

160-
// Read the tsconfig to determine if we should prefer ES2015 modules.
161-
162160
return {
163161
resolve: {
164162
extensions: ['.ts', '.js'],

packages/@angular/cli/models/webpack-configs/production.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,8 @@ export function getProdConfig(wco: WebpackConfigOptions) {
121121
uglifyCompressOptions.passes = 3;
122122
}
123123

124-
// Read the tsconfig to determine if we should apply ES6 uglify.
125-
const tsconfigPath = path.resolve(projectRoot, appConfig.root, appConfig.tsconfig);
126-
const tsConfig = readTsconfig(tsconfigPath);
127-
const supportES2015 = tsConfig.options.target !== ts.ScriptTarget.ES3
128-
&& tsConfig.options.target !== ts.ScriptTarget.ES5;
124+
const supportES2015 = wco.tsConfig.options.target !== ts.ScriptTarget.ES3
125+
&& wco.tsConfig.options.target !== ts.ScriptTarget.ES5;
129126

130127
if (supportES2015) {
131128
extraPlugins.push(new UglifyJSPlugin({

0 commit comments

Comments
 (0)