react-fontawesome icon indicating copy to clipboard operation
react-fontawesome copied to clipboard

Not compatible with Jest ESM

Open jasperlin451 opened this issue 1 year ago • 1 comments

Describe the bug

When trying to upgrade my project to be fully ESM, I run into

    SyntaxError: The requested module '@fortawesome/react-fontawesome' does not provide an export named 'FontAwesomeIcon'

This should be fixable by updating the following lines: https://github.com/FortAwesome/react-fontawesome/blob/976c1adc59934b34e52b11c03dda4bd69831a6df/package.json#L5-L7

to use the modern Node.js packaging standard.

{
  "type": "module",
  "exports": {
    "import": "./index.es.js",
    "require": "./index.js"
  }
} 

jasperlin451 avatar Dec 04 '23 19:12 jasperlin451

@jasperlin451 Maybe create a PR for "This should be fixable by updating the following lines:" ?

dhwang avatar Mar 06 '24 20:03 dhwang