Skip to content

Clarification on debug output #72

Open
@mike-oakley

Description

@mike-oakley

Hi,

I'm experimenting with the usage-pure mode to polyfill. The debug output from the plugins seems to indicate that no polyfills are applied - every source file has a debug output of:
Based on your code and targets, the corejs3 polyfill did not add any polyfill.
Based on your code and targets, the regenerator polyfill did not add any polyfill.

However, when I look at the output JS, I can see that polyfills (such as Promise) have been applied (as I would expect). How come none of the applied polyfills are mentioned in the debug output? Am I missing them being applied elsewhere or is this a quirk of the new polyfills plugins? Thanks!

For information:
I have a browserslist config in package.json of > 0.25%, not dead, which gives a targets list of:

Using targets: {
  "chrome": "85",
  "edge": "88",
  "firefox": "85",
  "ie": "11",
  "ios": "12.2",
  "opera": "73",
  "safari": "13.1",
  "samsung": "13"
}

My Babel config looks like this:

{
  "presets": [
    [
      "@babel/typescript",
      {
        "jsxPragma": "h"
      }
    ],
    [
      "@babel/preset-env",
      {
        "useBuiltIns": false,
        //"modules": false,
        "bugfixes": true,
        "debug": true
      }
    ]
  ],
  "plugins": [
    "@babel/proposal-class-properties",
    "@babel/proposal-object-rest-spread",
    [
      "@babel/plugin-transform-react-jsx",
      {
        "pragma": "h",
        "pragmaFrag": "Fragment"
      }
    ],
    [
      "babel-plugin-transform-builtin-extend",
      {
        "globals": ["Error"]
      }
    ],
    [
      "@babel/transform-runtime",
      {
        "regenerator": false,
        "debug": true
      }
    ],
    ["polyfill-corejs3", {
      "method": "usage-pure",
      "debug": true
    }],
    ["polyfill-regenerator", {
      "method": "usage-pure",
      "debug": true
    }]
  ]
}

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