Ionaru/easy-markdown-editor
Vedi su GitHubCodeMirror.commands undefined when importing package
Open
#43 aperta il 7 gen 2019
BugHelp wanted
Metriche repository
- Star
- (3006 star)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
I'm submitting a...
- Bug report
- Feature request
Reproduction steps
- Install package
npm install --save easymde - Use webpack to bundle your js and point it to an entrypoint javascript file.
- Import it in your JS file
import "easymde"orimport { EasyMDE } from "easymde"orimport * as EasyMDE from "easymde" - Visit page that JS is loaded, it will say
CodeMirror.commands is undefinedin 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?
const EasyMDE = require('easymde/dist/easymde.min.js');
Version information
Browser type and version: Chrome/Firefox EasyMDE version: 2.4.2