codex-team / editor.js

A block-style editor with clean JSON output
https://editorjs.io
Apache License 2.0
27.61k stars 2.02k forks source link

[Bug] EditorJS does not have a default export per rollup #1558

Open dialing-up opened 3 years ago

dialing-up commented 3 years ago

Describe a bug.

[!] Error: 'default' is not exported by node_modules/@editorjs/editorjs/dist/editor.js, imported by out-tsc/src/BlogBuild.js

Steps to reproduce: Import EditorJS as '@editojs/editorjs'

Editor.js version: 2.19.1

Plugins you use with their versions: none

Edit: When I added 'export default EditorJS' as a line at the end of @editorjs/editorjs/dist/editor.js, it started working, so I believe that is the issue.

raykyri commented 3 years ago

Had the same problem here. Building with yarn build generates a file with all the expected code but the export is missing.

Edit: here is one possible resolution: https://github.com/raykyri/editor.js/commit/228cd91399a1664e1032763a025297f77cbc198f