wix-incubator / mjml-react

React component library to generate the HTML emails on the fly
MIT License
989 stars 50 forks source link

<Mjml> ^ SyntaxError: Unexpected token '<' #85

Closed apurvjain28 closed 2 years ago

apurvjain28 commented 2 years ago
Screen Shot 2022-07-19 at 11 06 49 AM

I have been trying to replicate the same example as given in the link below in my project: https://github.com/wix-incubator/mjml-react-example/blob/master/src/email.js

But it is showing a weird Syntax Error as if it doesn't understand mjml-react syntax. If I try to send normal mjml rendered HTML on my mailTrap account then it's working. But somehow it can not read the imports from mjml-react.

What could be the possible fix for it?

daliusd commented 2 years ago

It looks like you have not configured React and/or JSX properly.