-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Esmodule version of the introduction of hast-util-from-dom leads to errors... #56
Comments
First, I am not a member of this project, but I am original author of this package. |
This is also definitely something your bundler can fix. And some of them do. So you might be able to solve it there. |
I tried it in the create-react-app failed, I believe that most applications will fail. |
webpack 4 has a lot of bugs. But you’re out of luck. CRA prevents you from working on that. |
I don't know if WebPack has an error, but I know that if WebPack / Rollup can't be compatible, it will use it very unfriendly. |
Webpack 5, Rollup, and Node support the way it is now. Your patch will break them. We (+ much more of the JS ecosystem) are moving to full ESM over the coming months: unifiedjs/unified#121 |
CRA migration WebPack 5 is a long-term process, so far, it has been completed 24%, then, the remark-math will be unavailable during this time before really complete. I am not opposing to support better ESModule standards, just want to remind, do compatibility processing. . .for example, now I can't use the CRA and ROLLUP package, so I can only use Patch-Node to modify until a certain time Remark-Math directly introduces no problem.
|
Why did you mention CRA before if you are now talking about (+ the links you share) Rollup?
This package is CJS. It uses a require to load a dual CJS/ESM package. Your bundler should use the CJS file. If it doesn’t, it’s either a bug there or it has to be configured in some way. |
So how should rollup configure the hast-util-from-dom using a CommonJS version of rehype-mathjax? |
Re this earlier message by @tani, what was your solution?
@rxliuli Can you answer this earlier question? |
Because I also need to use MarkDown in the CRA project in the production environment, ITMDOWN-IT is currently used, but I want to unify them. |
Forget it, I temporarily close this problem. Anyway, the question has been temporarily solved, and there is at least other options if not. . . |
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
[email protected]
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: