-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Unable to use html-react-parser in create-react-library #80
Comments
Hi @kartik01, could you provide the steps so I can reproduce the issue? And please let me know what OS, node, npm/yarn version you're using. The error seems to be coming from |
Hi @remarkablemark , here is information regardig to reproduce this error. Steps to Produce.
i am using client side rendering. |
It seems that rollup is not properly checking the Because the library is isomorphic (runs on both server and client), the browser field is what tells bundlers like webpack to replace certain code with browser compatible code. Importing the client-version of the library should resolve the error: // src/index.js
import Parser from 'html-react-parser/dist/html-react-parser' Let me know if it works for you. |
Thanks @remarkablemark,
I think this is issue of rollup. |
I agree @kartik01. Feel free to close the issue if it's resolved. |
I was creating an npm module with the help create-react-library,
I which i was using html-react-parser.
but after importing html-react-parser, its giving error
The text was updated successfully, but these errors were encountered: