-
-
Notifications
You must be signed in to change notification settings - Fork 37
Issues with markdown-it-shikiji update #44
Comments
TypeScript seems to be a setup issue, can you create a reproduction repo so I can have a look? |
@antfu here you go |
Thanks, but there are too many things involved. A minimal reproduction, please. |
😂 I definitely gave you the wrong link; sorry about that. I'll get a minimal repo set up. Functionally things seem to work perfectly other than the type issue and the line highlighting. |
Sorry about the wrong reproduction link - I've put together a much simpler example on CodeSandbox. In putting this together, I actually figured out everything other than the TypeScript error for the The line highlighting was caused by another plugin; the leading/trailing |
On the type imports, the import { fromHighlighter } from markdown-it-shikiji/core'; but then I get an import warning: Cannot find module 'markdown-it-shikiji/core' or its corresponding type declarations. Installing |
If you change |
Derp yep. I had originally just reused my tsconfig from another lib. Sorry for the noise; the added metadata also clears it up as-is |
Describe the bug
After following the new enhancements from https://shikiji.netlify.app/packages/markdown-it#fine-grained-bundle, a couple things I'm noticing after trying it out via #42
Shikiji is required as a devDependency
In order to get the imports to properly resolve (at least in my
pnpm
project) I need to explicitly runpnpm add -D shikiji
. I'm guessing this should be added to the docs for themarkdown-it
plugin, in theFine-grained Bundle
docs section.fromHighlighter
import pathI had to use an import path like this instead of what's in the docs
Type mismatch when using
fromHighligher
If I utilize the example provided in the docs, I get the following type error:
As seen here:
based on this usage:
Reproduction
above
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: