Skip to content

Add Support for BrowserList and Core-JS Polyfills Automatically #20095

@RehanSaeed

Description

@RehanSaeed

Babel provides the babel-preset-env plugin which uses the [browserlist] syntax shown below to automatically add pollyfills from core-js. This looks at the browsers you want to support and automatically adds the required pollyfills. Babel even goes as far as recommending this approach.

>1%
Last 4 versions

I never want to have to think about which pollyfills I need to add, TypeScript should provide a typescript-preset-env NPM package to do this for you as it's a very common scenario and easily prone to error. TypeScript should support the browserlist format directly in the tsconfig.json file or in a separate .browserlistrc file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions