Skip to content

Allow legacy compilation(babel transformation) of the polyfill #10284

@Tal500

Description

@Tal500

Description

Currently, on plugin-legacy, the legacy polyfill is generated by compilation to ES5.
The problem is that when using "additional polyfill" property for supplying external polyfills, some of them aren't fully legacy compatible.
For example, I get in my project that Chrome 39 doesn't know the keyword "const", so the polyfill loading breaks JS on this browser.

Suggested solution

(Add an option to) transform the additional legacy polyfills by babel preset plugin or something like that, in plugin-legacy.

Alternative

No response

Additional context

Clarification - what I want to be done is already down with the regular JS content, that is being transformed by babel. I want an option to "do the same" for the generated legacy polyfill.

Validations

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions