Skip to content

The difference between 'compat-alias-package' and 'compat' package inside preact main repo #3745

Closed
preactjs/compat-alias-package
#8
@ymchun

Description

@ymchun
  • Check if updating to the latest Preact version resolves the issue

Background
We are developing a web component sdk using react-to-webcomponent. The sdk original use react & react-dom but we alias react using preact in our Vue application according to this doc.

Describe the bug
When aliasing react using the following alias in package.json

"react": "npm:@preact/compat",
"react-dom": "npm:@preact/compat",

the error prompt out

Module not found: Error: Package path ./client is not exported from package [my project path]/node_modules/react-dom (see exports field in [my project path]/node_modules/react-dom/package.json)

it works when using the following alias

"react": "link:node_modules/preact/compat",
"react-dom": "link:node_modules/preact/compat",

Seems compat in main repo has client.js exported but none in compat-alias-package

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions