镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

FR: Avoid using bigint literal syntax to target older browsers #541

Closed

Description

@mman

One of my projects targets very old specialised browsers, and when readable-stream dependency is brought in the webpack produced code fails to run because of SyntaxError here:

if (input > 2n ** 32n || input < -(2n ** 32n)) {
received = addNumericalSeparator(received)

Turns out that specialised browser based on WebKit can not parse bigint literals.

I'm not sure if I am missing something but I was not able to find a solution to transpile the bigint literals correctly to target older browsers.

But turns out that the fix could be to avoid bigint literal and use BigInt constructor.

Activity

  1. mman commented on Oct 8, 2024

    @mman
    ContributorAuthor

    Attempt to address this cleanly here: #542

  2. mman commented on Dec 19, 2024

    @mman
    ContributorAuthor

    Addressed by #542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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