Skip to content

Change how the compat builds are produced #269

@stasm

Description

@stasm

#133 changed the browser compatibility matrix of our compat builds. It was a good decision for Fluent and for the web. Unfortunately, while most browser support modern JavaScript, it turns out a significant portion of build tools like Webpack and more specifically, UglifyJS, do not 🤦‍♂️ .

I'm afraid we might need to re-implement strict ES5 compatibility in one way or another. I don't think we can expect existing projects to go through the whole ordeal of updating their build pipeline just to be able to use a newer version of fluent and friends.

Right now we produce two builds for each package:

  • index - no transpilation at all, and
  • compat - transpiled according to the modern compatibility matrix.

The moder compatiblity matrix expects the engine to support async functions, classes and generators, among others.

I propose we switch to the following strategy:

  • index - transpiled according to the modern compatibility matrix,
  • compat - transpiled to strictly ES5-compatible code,
  • vanilla - not transpiled at all. This could also be called modern or ecma.

The vanilla builds will be allowed to use cutting-edge features like async iteration, implemented only in Firefox 57 and Chrome 63.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions