nozer/quill-delta-to-html

ESM export

anoblet opened this issue · 3 comments

I'm receiving this error:

The requested module '../../node_modules/quill-delta-to-html/dist/commonjs/main.js' does not provide an export named 'QuillDeltaToHtmlConverter'

I believe this is because it is not being exported as a module.

I also had this problem, the work around is to import the detault aka:

import qdthtml from 'quill-delta-to-html';
...
const converter = new qdthtml.QuillDeltaToHtmlConverter(opts, cfg);

import { QuillDeltaToHtmlConverter } from 'quill-delta-to-html';

this worked for me too.

I also get the error when I try to use
import { QuillDeltaToHtmlConverter } from 'quill-delta-to-html';

The work around also is not working for me. I use 0.12.0 with an lit2 web application. I try to clone the repo and switch target to es6 but no success at the moment. Are there different methods to integrate that module or I am on the wrong path?