-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify preact/compat integration docs #4267
Conversation
🦋 Changeset detectedLatest commit: 74028d5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
> **Note** | ||
> Currently, the `compat` option only works for React libraries that export code as ESM. If an error happens during build-time, try adding the library to `vite.ssr.noExternal: ['the-react-library']` in your `astro.config.mjs` file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to the content but i just noticed the github note syntax creates a blockquote
i'm guessing we don't want to use the custom admonition syntax in the readmes
:::note
Currently, the `compat`...
:::
since the github syntax is consistent, maybe there's a transformation that could happen in remark? /cc @sarah11918 @delucis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well spotted @mayank99! That's actually something I've been wanting to add: use GitHub's syntax in these files and then automatically transform them in docs withastro/docs#967
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks @bluwy!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for investigating the fix for this. Merging so that we can get this into the next release.
Changes
Close #4107
Spent a fair bit of time with this today, and I think this is the best we can do at the moment:
react
andreact-dom
to@preact/compat
to intercept the alias into nested packages.ssr.noExternal
.red: extra context #4107 (comment)
Testing
N/A (docs change)
Docs
Updated preact readme