Closed udovin closed 1 year ago
Thanks for noticing the missing types! It should be updated in v1.2.1
It looks like the error your getting is because of unified
, not unified-latex
. It's a bit annoying, but unified
does not include cjs exports, so you must import as mjs or transpile. I am not sure if it's helpful, but you can see here:
For where I had to special case all the unified packages to get them to play nicely with jest. I've also found that esbuild gives me a lot less trouble compared to ts-loader.
The second problem was fixed - thank you very much! With the first one I tried to transpile modules, but no success. Most likely because there is no complete understanding of how it works.
Adding externals: [],
to webpack.config.json
solved my problem. I think it will be ok for SSR.
Hi I'm trying to get webpack to work with unified-latex.
Here is my
webpack.config.js
:Here is my
tsconfig.json
:After that I try to run:
And I got the following error:
Seems like package
unified-latex-util-parse
mixcjs
andjs
in imports. I have tried different approaches, but have achieved a positive result.Also it seems like
"@unified-latex/unified-latex-to-hast": "^1.2.0"
has missing.d.ts
in npm, but this problem was fixed using following stupid fix:types-fix.d.ts:
This can be fixed switching to version
1.1.0
of@unified-latex/*
.