Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.39k stars 316 forks source link

Cannot bundle code with webpack that imports EasyMDE #14

Closed syropian closed 6 years ago

syropian commented 6 years ago

I'm submitting a...

Reproduction steps

  1. npm install easymde --save
  2. Added import EasyMDE from 'easymde'
  3. Compiled the component that imports it using webpack

Version information

Node: 8.9.4 NPM: 5.6.0 EasyMDE version: 2.0.1

Issue: I currently have webpack set up as my app's bundler, and I've had no problems so far with any other modules, but after installing and trying to use easymde, babel-loader freaks out and says it cannot find the module, even though I confirmed it's present in node_modules. I tested with another module and it worked fine. Could it be because your package.json main field points to the dev build of the module?

syropian commented 6 years ago

Confirmed, it's a buggy line in the package.json. Manually changed it and it fixed it. Will submit a PR.

syropian commented 6 years ago

@Ionaru Could you publish the latest version to NPM? It's still using 2.0.1 but the latest seems to be 2.1.0, which has the fixed package main path already in it.

Ionaru commented 6 years ago

I'll deploy it soon, in the meantime you can install the latest version using npm install easymde@next. That tag will always be up-to-date with the development branch.

syropian commented 6 years ago

@Ionaru Good tip, thanks!