codex-team / codex-team/editor.js

Why can't import BlockAddedMutationType

Open
#2,587 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

When you use
`import EditorJS, {BlockAddedMutationType} from '@editorjs/editorjs';`

You will get this error:
`SyntaxError: The requested module '/node_modules/.vite/deps/@editorjs_editorjs.js?v=03c9909b' does not provide an export named 'BlockAddedMutationType' (at Editor.vue:7:1)`

But in VSCode, ctrl+click could jump to export file, and shows BlockAddedMutationType exported
And after tries, I found this works:
`import EditorJS, {type OutputData} from '@editorjs/editorjs';`

So, what magic behind this ? editorjs hope we use it or otherwise?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.