Closed davenlin19 closed 8 years ago
perhaps it's because of the missing div
close? (</div>
)
Sorry, i have the div
close in my code. It's not the problem.
I think you have some misconfiguration in your build pipeline, it's like you are trying to compile the .rt
file as a JavaScript file.
Don't know much of Browserify (I'm a Webpack guy), you have to make sure that .rt
files are processed by react-templates and the result is added to the bundle.
Also, unless you use --modules ES6
, the output from react-templates doesn't need to be transpiled because it's already ES5.
Thank you, by adding transform: ['react-templatify']
into browserify's config. It works.
I've got an error: "Browserify Error: ParseError: Unexpected token" when building by Babel and Browserify. How could i fix that ?
Hello.rc
<div>Test</div>
^
ParseError: Unexpected token
.babelrc
{ "presets": ["es2015", "react"] }
Thanks