Skip to content

Improve transpiling efficiency #2

Open
@InterLinked1

Description

@InterLinked1

The recently added on-the-fly transpiling support is very inefficient (hence it being whitelisted on a per-domain basis), and quite honestly overkill for what's needed here: transpiling only nullish coalescing and optional chaining. Babel doesn't seem to support this in the proper way.

As noted on the MSFN forums, there is probably a more efficient way to approach this:

For GitHub exclusively, you may want to have a look at
martok/palefill#29 (comment)
and
https://github.com/dirkf/palefill/commits/df-optchain-patch
https://github.com/dirkf/palefill/releases/tag/v1.19df

The dev(s) use simple transpiling JS code for just those two operators, nothing more (the rest can be handled by polyfills)

Ideally, the transpiling should only analyze for these operators and nothing else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions