tiptap
tiptap copied to clipboard
Remove `@types/lowlight` from `@tiptap/extension-code-block-lowlight` dependencies
What’s the bug you are facing?
Outdated type-declaration from @types/lowlight
package, which is a dependency for @tiptap/extension-code-block-lowlight
.
The lowlight
package already declares its own types, thus, the outdated @types/lowlight
should be removed from the extension's dependencies.
Which browser was this experienced in? Are any special extensions installed?
How can we reproduce the bug on our side?
Install the @tiptap/extension-code-block-lowlight
, which installs @types/lowlight
as a dependency.
Then do:
import { lowlight } from 'lowlight'
And you'll notice an error saying Module '"lowlight"' has no exported member 'lowlight'.
Can you provide a CodeSandbox?
Not my codesandbox, but taken from another issue: https://github.com/ueberdosis/tiptap/issues/2116#issuecomment-957797324 https://codesandbox.io/s/trusting-lake-22hls
Notice the error on the lowlight import:
What did you expect to happen?
To import the updated type-declaration from lowlight
package instead of the outdated @types/lowlight
package.
Anything to add? (optional)
No response
Did you update your dependencies?
- [X] Yes, I’ve updated my dependencies to use the latest version of all packages.
Are you sponsoring us?
- [ ] Yes, I’m a sponsor. 💖
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days
I have same issue.
I have resolved this way.
import { lowlight } from 'lowlight/lib/common.js';