react icon indicating copy to clipboard operation
react copied to clipboard

Request: Define to exports cjs/* files in package.json

Open vctqs1 opened this issue 4 months ago • 2 comments

React version: 18.2.0 I am encountering an issue when attempting to use React version 18.2.0 to build CJS to ESM support in browsers. The problem is related to the cjs folder not being defined in the "exports" field of the React package.json file. Please check out this message error https://github.com/esm-bundle/react/actions/runs/7909812813/job/21591452688?pr=303#step:6:16

[!] Error: Package subpath './cjs/react.development.js' is not defined by "exports" in /Users/vctqs1/Documents/developer/forked/react/node_modules/react/package.json

While cjs folder is not exports

The current behavior

  • cjs folder is not exports

The expected behavior

  • cjs folder is able exports in package.json

vctqs1 avatar Feb 18 '24 11:02 vctqs1