-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Deno SSR/SSG support #690
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
@shishkin Component doesn't use JSDOM internally, it's a problem with isomorphic-dompurify - https://github.com/kkomelin/isomorphic-dompurify/blob/master/package.json#L35 Only what can I suggest to override the function sanitize(html: string) {
return html;
}` of course you need to remember that it's not the safe. Another option is to find some equivalent for |
I see. I guess And would it be possible to remove <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m8.25 4.5l7.5 7.5l-7.5 7.5"/></svg> |
We can, however component is treeshakable https://github.com/asyncapi/asyncapi-react/blob/next/library/package.json#L42, so it means that for bundled apps we only leave |
Yes, I understand the total bundle only has that single SVG. I still think it's worth minimizing dependencies, especially in the ESM world.
Submitted #692. |
@shishkin Can we close that issue, or you wanna wait for fixing ESM problem in the |
Yes, we can close this now. I was finally able to server-render this component on Deno by overriding dependencies. I've filed an issue to |
I've searched for similar issues but could not find anything. I'm trying to get this component work on Deno with Lume. I followed the Next.js guide with @asyncapi/react-component loaded via esm.sh. But I ran into issues with dependencies like JSDOM, isomorphic-dompurify and react-icons. While I was able to replace
react-icons
with https://github.com/UrielCh/react-icons, I'm stuck with JSDOM and isomorphic-dompurify.JSDOM calls into unsupported Deno API:
And isomorphic-dompurify seems to have messed up export maps.
So, this is not a "bug" against this project but merely a call for help and maybe a suggestion to add a test case for the component to render in Deno. All help is appreciated.
The text was updated successfully, but these errors were encountered: