carton icon indicating copy to clipboard operation
carton copied to clipboard

Integrate with caniuse.com for easier legacy browsers support

Open MaxDesiatov opened this issue 2 years ago • 0 comments

Motivation

As we start using newer features, like BigInt, FinalizationRegistry etc, we should still allow targeting older browsers.

Proposed solution

I'm currently thinking we could make --environment option more granular, allowing users to specify browser versions or JS versions, similarly to how --target option of esbuild works. Based on this information, we could pass additional flags to JSKit build (namely JAVASCRIPTKIT_WITHOUT_WEAKREFS), enable/disable i64 transform etc.

Alternatives considered

Not sure if direct support in SwiftPM and Swift for something like this is on the table yet, I previously tried something similar with https://github.com/swiftwasm/swift-package-manager/pull/373.

MaxDesiatov avatar May 11 '22 12:05 MaxDesiatov