Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I avoid generating multiple build files - angular 9 - ng build

I have created a sample angular 9 application using angular cli and when I execute ng build, multiple files are generated to support different version of Browsers. (For Ex: main-es5.js and main-es2015.js).

As for micro-frontend architecture, I want to generate only one .js file by combing all of them for that i can upload it on server, how it can be done ?

enter image description here

like image 343
Anand Kumar Avatar asked Mar 30 '20 09:03

Anand Kumar


1 Answers

Go to your tsconfig.ts and change "target": "es2015" to "target": "es5"

like image 120
Yazan Mehrez Avatar answered Oct 23 '22 14:10

Yazan Mehrez