Hey guys, I am trying to make markdown editor using React and Codemirror. Default view (with any language mode) works fine, however when I try to import and add markdown module, I am constantly getting this error.
Are you maybe loading the markdown mode before the main library? createCommonjsModule in the stack trace suggests you are using some kind of module loader. Which one?
I was under the impression that Showpack targets ES modules, which CodeMirror doesn’t yet provide. Maybe it’s automatically converting the UMD code to ES modules and something goes wrong there. I don’t really have enough experience with Snowpack to say much here.