htmlpreview / htmlpreview.github.com

HTML Preview for GitHub Repositories
htmlpreview.github.com
1.53k stars 307 forks source link

I couldn't preview my application. The htmlpreview supports React? #56

Closed daniellycosta closed 6 years ago

daniellycosta commented 6 years ago

I generated the link on the site (LINK HERE!) but nothing happens and I only see a blank page.

niutech commented 6 years ago

The reason is Uncaught SyntaxError: Unexpected token < - you have JSX code included in <script> and HTMLPreview does not support JSX, only vanilla JS. You can transcode JSX to JS using Babel.

daniellycosta commented 6 years ago

Thank you! I'm going to try

4e1e0603 commented 6 years ago

I have a similar problem with modules:

SyntaxError: import declarations may only appear at top level of a module.
niutech commented 6 years ago

You cannot use ES6 import in functions and this polyfill is wrapping the code in an anonymous function. So it will not work.