quill-image-drop-module icon indicating copy to clipboard operation
quill-image-drop-module copied to clipboard

Unexpected token export

Open darioAnongba opened this issue 8 years ago • 4 comments

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.

darioAnongba avatar Jun 02 '17 17:06 darioAnongba

Hi How to run it

luther-nwpu avatar Jul 19 '17 13:07 luther-nwpu

Please update this issues

tagmetag avatar Dec 11 '17 09:12 tagmetag

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

merrylmr avatar Jan 16 '18 09:01 merrylmr

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

valoricDe avatar Feb 24 '19 15:02 valoricDe