I was following this StackOverflow link
and I find this solution as most logical:
var __html = require('./template.html');
var template = { __html: __html };
React.module.exports = React.createClass({
render: function() {
return(
<div dangerouslySetInnerHTML={template} />
);
}
});
but I can not apply it because I'm getting an error:
Uncaught (in promise) Error: Module parse failed: C:\Users\....\target.html Unexpected token (1:0) You may need an appropriate loader to handle this file type.
| <!DOCTYPE html>
| <html xmlns="w3.org/1999/xhtml">;
| <head><title>