Closed kopax closed 6 years ago
Hello,
I have same issue:
ERROR in bundle.js from UglifyJs Unexpected token: punc (() [./node_modules/react-html-email/lib/PropTypes.js:26,0][bundle.js:10137,7]
My versions:
"webpack": "^3.6.0",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-html-email": "^3.0.0",
$ node --version v6.9.4
Ok for development, issue happens in webpack build.
Thanks
@dpetrini I have found the reason of that issue, @chromakode did make that module for NodeJS.
For that, you need to check the babel target here :
https://github.com/chromakode/react-html-email/blob/master/.babelrc#L5
I have made a browser compatible version of the 3.0.0 of react-html-mail
:
https://www.npmjs.com/package/react-html-email-browser
All I did was to change the target.
Hi @chromakode , I have installed and tested your library. The HTML email I receive is working. Thanks a lot for sharing your work.
I am trying to build for production with webpack and It seems that you are not transpiling your module to es2015 module.
That looks like to be a problem : https://github.com/chromakode/react-html-email/blob/master/.babelrc#L5
I have made and published this version that correct the plugin for browsers:
version