-
Notifications
You must be signed in to change notification settings - Fork 4
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
Failed to build in production #1
Comments
Thanks for reporting. I'll take a look. |
@ivan-kleshnin Then, moved to |
The problem stems from React using UglifyJS which still does not support a single bit of ES6 syntax. And they aren't going to, choosing to release an alt. React is sticking to basic I can address this problem by adding a build step or by avoiding ES6 syntax. As for your example: <Safe.div><div>test</div></Safe.div>
<div dangerouslySetInnerHTML={{__html: <div>test2</div>}}></div> Both does not work as expected (rendering The correct syntax is: <Safe.div>{"<div>test</div>"}</Safe.div>
<div dangerouslySetInnerHTML={{__html: "<div>test2</div>"}}></div> Passing React objects as strings can be handled but it does not seem right because HTML is a string by definition (as is JSON btw.). |
@ivan-kleshnin Thanks for your nice explanation. 👍 |
No problem :) Should be fixed in 1.1.0. |
I have used like that,
<Safe.p><div>Hello, World!</div></Safe.p>
. And then, I'm facing to build in the production version.See the Image
The text was updated successfully, but these errors were encountered: