Open marcuslind90 opened 5 years ago
Facing a similar issue that import "easymde/dist/easymde.min.css";
works but not import "easymde/src/css/easymde.css";
So this is probably caused by https://github.com/Ionaru/easy-markdown-editor/blob/master/src/js/codemirror/tablist.js#L6
What happens when you manually import CodeMirror first?
Any solution to this yet? We are migrating from Brunch to Webpack and run into the exact same issue.
EasyMDE 2.13.0 Webpack 5.4.0
@Ionaru if I try to import CodeMirror first as follows, it does not change the error:
import CodeMirror from "codemirror";
import EasyMDE from "easymde";
import "easymde/dist/easymde.min.css";
I don't have a lot of experience with Webpack so I can't say what a good solution would be. The workaround is to use the minified package, that includes CodeMirror.
Too bad, was wondering if anyone found out in the meantime. I guess it has something to do with requiring modules that can't be resolved, but I could not figure it out as I am no JS expert. Either way, for now we'll use the minified version :)
I'm submitting a...
Reproduction steps
npm install --save easymde
import "easymde"
orimport { EasyMDE } from "easymde"
orimport * as EasyMDE from "easymde"
CodeMirror.commands is undefined
in browser console.If I import the minified js file (see below) it works fine, so I guess the issue is related to the bundling, perhaps some dependency or something that have to be set in the webpack config file that is not specified?
Version information
Browser type and version: Chrome/Firefox EasyMDE version: 2.4.2