Faire / mjml-react

React component library to generate the HTML emails on the fly
https://www.npmjs.com/package/@faire/mjml-react
MIT License
376 stars 16 forks source link

Cannot find module html-entities.json #57

Closed chriswolmarans closed 1 year ago

chriswolmarans commented 1 year ago

Hi All, thanks so much for taking on this fresh direction on this fork. I tried out the alpha mentioned in issue 36 as I ran into the same problem and got the following error:

Cannot find module './html-entities.json' from '../../node_modules/@faire/mjml-react/dist/src/utils/html-entities.js'
Require stack:
/app/node_modules/@faire/mjml-react/dist/src/utils/html-entities.js
/app/node_modules/@faire/mjml-react/dist/src/utils/index.js
/app/node_modules/@faire/mjml-react/utils.js

I’m not sure if I’m using the render function correctly, import {render} from ‘@faire/mjml-react/utils’; or if I’m supposed to implement my own.

Appreciate any help on this. Thank you!

IanEdington commented 1 year ago

Thanks for trying out the alpha and reporting this @chriswolmarans

It looks like we're not packaging that file.

We should look into bundling the html-entities.json file with both the esm and cjs packages

hchiufaire commented 1 year ago

Hi @chriswolmarans,

This issue has now been addressed in v3.0.0, which has just been released to npm.

chriswolmarans commented 1 year ago

@hchiufaire thanks for the heads up, appreciate the help, will try it again.