@types/markdown-it doesn't provide default exports, so I got an error saying something like: Module '"/path/to/@types/markdown-it/index"' can only be default-imported using the 'esModuleInterop' flag. (And yes, I had esModuleInterop activated in my tsconfig)
I fixed it by importing only PluginWithOptions. I don't really understand why this works (and didn't before) but it works so I think it's ok. It should work on all TypeScript build targets.
This fixes the import of types from
markdown-it
.@types/markdown-it
doesn't provide default exports, so I got an error saying something like:Module '"/path/to/@types/markdown-it/index"' can only be default-imported using the 'esModuleInterop' flag
. (And yes, I hadesModuleInterop
activated in my tsconfig)I fixed it by importing only
PluginWithOptions
. I don't really understand why this works (and didn't before) but it works so I think it's ok. It should work on all TypeScript build targets.