I’ve started looking at supporting custom Web components into the ProseMirror editor. These days, I develop in Typescript for Chrome and Firefox which support ES6 modules.
I have locally update the package.json files of different modules to introduce a definition
module similar to
main, except that it points on the file in
src/ instead of
dist/. It works well up to trying to process an
mport * as OrderedMap from 'orderedmap'… This import fails because the index.js is not an ES6 module (it’s just a compiled CommonJS version I guess).
- Is it possible you have the ES6 version of it? I can refactor the code otherwise.
- With an ES6 version of the code, can I propose a PR to https://github.com/marijnh/orderedmap with an updated package.json?
It seems to be the only blocker for everything to work smoothly in a modern browser, without transpilation step.