Skip to content

accept an array of polyfills? #4709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nekkon opened this issue Feb 15, 2017 · 5 comments
Closed

accept an array of polyfills? #4709

nekkon opened this issue Feb 15, 2017 · 5 comments

Comments

@nekkon
Copy link

nekkon commented Feb 15, 2017

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!

@nekkon nekkon changed the title accept an array of for Polyfills? accept an array of polyfills? Feb 15, 2017
@grizzm0
Copy link
Contributor

grizzm0 commented Feb 15, 2017

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.

@nekkon nekkon closed this as completed Feb 15, 2017
@fayezmm
Copy link

fayezmm commented Apr 25, 2017

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"
        ],
    }],
}

@arlowhite
Copy link

@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.

@aciccarello
Copy link
Contributor

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.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants