swc-project / swc

Rust-based platform for the Web

Home Page:https://swc.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swc/jest not support array.with

PeterChen1997 opened this issue · comments

Describe the bug

It's a feature in es2023, I changed my swcrc file's target, but I still get the problem...
image

Input code

No response

Config

[
  {
    "test": ".*.tsx?$",
    "jsc": {
      "parser": {
        "syntax": "typescript",
        "decorators": true,
        "dynamicImport": true,
        "tsx": true
      },
      "transform": {
        "legacyDecorator": true,
        "decoratorMetadata": true,
        "react": {
          "runtime": "automatic",
          "refresh": true
        }
      },
      "externalHelpers": true,
      "target": "es2023"
    }
  },
  {
    "test": ".*.js$",
    "jsc": {
      "parser": {
        "syntax": "ecmascript",
        "decorators": true,
        "dynamicImport": true
      },
      "transform": {
        "legacyDecorator": true,
        "decoratorMetadata": true
      },
      "externalHelpers": true,
      "target": "es2023"
    }
  }
]

Playground link (or link to the minimal reproduction)

https://play.swc.rs/?version=1.3.100&code=H4sIAAAAAAAAA0ssKkqs1CvPLMnQ0AQA0rYmxAwAAAA%3D&config=H4sIAAAAAAAAA1VPOw7DIAzdOQXy3KFi6NA79BCIOhERAYQdqSjK3QsJpM1mv4%2Ff8yqkhIkMPOVaxrJEnQjTuReEsmf9KQhwjkgm2chw6yxTpQbtCHdoOxhgnUbk6kJSd6WaA1wIhN3RsNl6O%2BT%2FTBPmmJDoKqxS7UeH10TRUmEO72Un2y%2B179HgAT9RDzsPg6VXd3JaUGxfBMLf3xcBAAA%3D

SWC Info output

No response

Expected behavior

support properly

Actual behavior

No response

Version

0.2.26

Additional context

No response

You missed

  "env": {
    "mode": "usage",
    "coreJs": "3.37"
  }

Thx!

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.