Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core-js polyfill for .replaceAll() stopped working in 1.3.21 #6888

Closed
gu-stav opened this issue Jan 31, 2023 · 1 comment · Fixed by #6921
Closed

Core-js polyfill for .replaceAll() stopped working in 1.3.21 #6888

gu-stav opened this issue Jan 31, 2023 · 1 comment · Fixed by #6921
Assignees
Labels
Milestone

Comments

@gu-stav
Copy link

gu-stav commented Jan 31, 2023

Describe the bug

The core-js config to polyfill .replaceAll() stopped working in 1.3.21.

1.3.20: https://play.swc.rs/?version=1.3.20&code=H4sIAAAAAAAAA1MvSS0uUdcrSi3ISUxOdczJ0VBX11FQV9e05lI31DPSM1bXKy7IySzRUNdT19RLLNHQNQRKRRsaGceCeCAOAG324sZDAAAA&config=H4sIAAAAAAAAA0WOSwrDMAxE76J1CMGFFnKEQg8hXCW4xB8kuzQE371ycclOmnkz0gEvsTAfkJCFuE2yh4wfmIGsR7HsUoZBMZUW3ITqABl5pdwQMZOZ1N5iFOrAAN4Ft%2BytzEafmEROC8O6%2FcmqXT4%2BSxMOyHuiX%2BcV6tnRc04eHcxcdKfwbhlNt0wRXEnfsJHprsfgMprbaKDWL8W4QhrhAAAA

1.3.21: https://play.swc.rs/?version=1.3.21&code=H4sIAAAAAAAAA1MvSS0uUdcrSi3ISUxOdczJ0VBX11FQV9e05lI31DPSM1bXKy7IySzRUNdT19RLLNHQNQRKRRsaGceCeCAOAG324sZDAAAA&config=H4sIAAAAAAAAA0WOSwrDMAxE76J1CMGFFnKEQg8hXCW4xB8kuzQE371ycclOmnkz0gEvsTAfkJCFuE2yh4wfmIGsR7HsUoZBMZUW3ITqABl5pdwQMZOZ1N5iFOrAAN4Ft%2BytzEafmEROC8O6%2FcmqXT4%2BSxMOyHuiX%2BcV6tnRc04eHcxcdKfwbhlNt0wRXEnfsJHprsfgMprbaKDWL8W4QhrhAAAA

Input code

'test'.replaceAll('', '');

Config

{
  "jsc": {
    "parser": {
      "syntax": "ecmascript",
      "jsx": false
    },
    "target": "es2020",
    "loose": false,
    "minify": {
      "compress": false,
      "mangle": false
    }
  },
  "module": {
    "type": "es6"
  },
  "minify": false,
  "isModule": true,
  "env": {
    "mode": "usage",
    "coreJs": "3.27.2"
  }
}

Playground link

No response

Expected behavior

I'd expect the polyfill-imports:

import "core-js/modules/es.string.replace-all.js";
import "core-js/modules/es.string.replace.js";
import "core-js/modules/es.regexp.exec.js";

still to be present.

Actual behavior

No response

Version

1.3.31

Additional context

Previous issues

@gu-stav gu-stav added the C-bug label Jan 31, 2023
@kdy1 kdy1 added this to the Planned milestone Feb 1, 2023
@kdy1 kdy1 self-assigned this Feb 1, 2023
@kdy1 kdy1 closed this as completed in #6921 Feb 9, 2023
kdy1 added a commit that referenced this issue Feb 9, 2023
**Description:**

Previously the default value of `targets` was `""`, which is not deterministic.

**Related issue:**

 - Closes #6888.
@kdy1 kdy1 modified the milestones: Planned, v1.3.35 Feb 10, 2023
@swc-bot
Copy link
Collaborator

swc-bot commented Mar 12, 2023

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.

@swc-project swc-project locked as resolved and limited conversation to collaborators Mar 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging a pull request may close this issue.

3 participants