File tree 2 files changed +2
-8
lines changed
packages/@angular/cli/models/webpack-configs
2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -157,8 +157,6 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
157
157
extraPlugins . push ( new NamedLazyChunksWebpackPlugin ( ) ) ;
158
158
}
159
159
160
- // Read the tsconfig to determine if we should prefer ES2015 modules.
161
-
162
160
return {
163
161
resolve : {
164
162
extensions : [ '.ts' , '.js' ] ,
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import { PurifyPlugin } from '@angular-devkit/build-optimizer';
9
9
import { StaticAssetPlugin } from '../../plugins/static-asset' ;
10
10
import { GlobCopyWebpackPlugin } from '../../plugins/glob-copy-webpack-plugin' ;
11
11
import { WebpackConfigOptions } from '../webpack-config' ;
12
- import { readTsconfig } from '../../utilities/read-tsconfig' ;
13
12
14
13
const UglifyJSPlugin = require ( 'uglifyjs-webpack-plugin' ) ;
15
14
@@ -121,11 +120,8 @@ export function getProdConfig(wco: WebpackConfigOptions) {
121
120
uglifyCompressOptions . passes = 3 ;
122
121
}
123
122
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 ;
123
+ const supportES2015 = wco . tsConfig . options . target !== ts . ScriptTarget . ES3
124
+ && wco . tsConfig . options . target !== ts . ScriptTarget . ES5 ;
129
125
130
126
if ( supportES2015 ) {
131
127
extraPlugins . push ( new UglifyJSPlugin ( {
You can’t perform that action at this time.
0 commit comments