Skip to content

Invalid flags supplied to RegExp constructor 'ug' #13191

@whalesink

Description

@whalesink

I have the following configuration for browserslist in package.json :

  "browserslist": {
    "production": [
      "chrome > 38"
    ],
    "development": "last 1 version"
  },

However, incompatible syntax still exists in the compilations:
image

I imported 'core-js' (3.30.2) into the entry file, and tried to override the configuration of cra through `craco' and rerun the build:

  babel: {
    presets: [
      [
        "@babel/preset-env",
        {
          targets: {
            chrome: "38",
          },
          useBuiltIns: "usage",
          forceAllTransforms: true,
        },
      ],
    ],

    plugins: [
        [
          "@babel/plugin-transform-unicode-property-regex",
          { useUnicodeFlag: false },
        ],
      ],
  },

But the same mistakes still appear, why is this?what should I do?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions