kensnyder / quill-image-drop-module

A module for Quill rich text editor to allow images to be pasted and drag/dropped into the editor.
214 stars 78 forks source link

Unexpected token export #4

Open darioAnongba opened 7 years ago

darioAnongba commented 7 years ago

Hi !

I just tried to use your module into React-Quill and it almost works but there is an issue. Why did you use export instead of "default export" ? Without this fix, I got an error: "Unexpected token export"

I just copy pasted your implementation and modified this and it worked. I won't do a pull request because it's just one single word to add (and then change the demo to "import ImageDrop from..." instead of "import {ImageDrop} from ..."

Here the default export is better because ImageDrop is the only thing class you are exporting.

luther-nwpu commented 6 years ago

Hi How to run it

tagmetag commented 6 years ago

Please update this issues

merrylmr commented 6 years ago

imageDrop引入之后,Unexpected token export错误。(vue-quill-editor下),请问是什么原因? image

valoricDe commented 5 years ago

You can add following script to your npm script section: "node-modules": "DIR=node_modules/quill-image-drop-module && babel $DIR/src --out-dir $DIR/dist --source-maps", it's a hack but it works