Angular-cli 8 - Is it possible to build only on es2015?
If you update your browserslist accordingly (.browserlistrc
-file or browserlist
-Array in package.json
) and only add browsers which are capable of ES2015, only one build should be created.
For example, when using
"browserslist": [
"> 5%"
]
I only get one build instead of two builds for es5
and es2015
. (Okay, to be fair, only chrome makes it into the list with > 5%
...)
(You can also check with npx browserslist
for a list of browsers that would currently be supported with your project setup. Also, see the "Differential Loading"-part here for a detailed explanation.)
You need to add the line defaults
and put the word not
at the begin of every line below in the file browserlist
. For example:
defaults
not > 0.5%
not last 2 versions
not Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
After that you can check changes by the command npx browserslist
. It should print nothing.