Hello, I get an error when I try to add more polyfills in an array in the polyfills settings of angular-cli.json. It says that it accepts only a string. Not sure how this should work, but in case more polyfills are required, shouldn't this option accept an array? don't these become a bundle and get loaded before anything else? Thanks for this great framework!
polyfills.ts is part of your project. You can simply edit that file instead of adding multiple files to the polyfills key in angular-cli.json.
We need the ability to generate multiple polyfills that are targeting different browser instead of having one giant polyfill file that fit them all. Something like:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"apps": [{
"polyfills": [
"polyfills-ie.ts",
"polyfills-chrome.ts",
"polyfills-safari.ts",
"polyfills-common.ts"
],
}],
}
@nekkon why was this closed? Is there a better solution for this issue?
Size of polyfills goes from 164kb to 280kb when you enable ES6 and animations. It would be nice to be able to create multiple polyfill files for different browsers.
If you are interested in different polyfills for different browsers see #6577. If you want to split up your polyfills file you can always break out the different polyfills and import them into your main polyfills.ts.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
We need the ability to generate multiple polyfills that are targeting different browser instead of having one giant polyfill file that fit them all. Something like: