react-mathjax icon indicating copy to clipboard operation
react-mathjax copied to clipboard

Problem pushing to production on Heroku

Open mayordwells opened this issue 7 years ago • 3 comments

I got this when I tried to use this in production on Heroku.

remote: ERROR in application-1d2e0f4cb11ca3bbb810.js from UglifyJs remote: Unexpected token: name (needsProcess) [./node_modules/@matejmazur/react-mathjax/lib/process-math.js:4,0][application-1d2e0f4cb11ca3bbb810.js:19275,4] remote: ERROR in Calculus/Integrate-2f72bd060579631b04ee.js from UglifyJs remote: Unexpected token: name (needsProcess) [./node_modules/@matejmazur/react-mathjax/lib/process-math.js:4,0][Calculus/Integrate-2f72bd060579631b04ee.js:2058,4]

Googling around I found this. - https://github.com/webpack/webpack/issues/2972 I checked your src code and found out that it's not compiled for use with es5, I would appreciate a quick fix to this and a possible opportunity to work with you on potential improvement to this plugin. I want to use it in production. Thanks and looking forward to work with you.

mayordwells avatar Dec 27 '17 11:12 mayordwells

Hi, thanks for your interest. I think that it would be much better if you fork it and create a better version because I don't have any experience with mantaining of libraries and now I'm using simple custom React component for KaTeX which has much simpler API (it just needs dangerouslySetInnerHTML). So I don't have time and reason to maintain this repo. I don't know how to achieve a better solution for React - MathJax and now I don't even need it.

MatejBransky avatar Jan 09 '18 22:01 MatejBransky

Hi @matemazur thanks for your reply. I just need a quick solution right now. Please tell me more about Katex. Does it support React? Are you also using it with React? I would also like to use it if it provides the solution that I need.

mayordwells avatar Jan 09 '18 22:01 mayordwells

KaTeX supports only TeX so you can't use ASCIImath. But I got used to it. I created this component: https://gist.github.com/MatejMazur/e7e87525b8f7f0b71fda28f7bea70e8a I'm building something like excel with user interface for my thesis where you can set custom conditions and it will show formatted document with some accompanying text, equations and output and I need a lot of equations which must be visible within process so you can catch the idea of computing - that's why I need this component. It must supports dynamic rendering because of placing numbers into the equations. I didn't create public library so you need to install KaTeX and PropTypes via npm. And if you want you can publish this as a package if you have time to maintain it.

MatejBransky avatar Jan 10 '18 06:01 MatejBransky