[Vuejs]-Why simditor-mention doesn't work at all

0👍

  1. The source code of simditor-mention is in the lib folder.
  2. It doesn’t have an exports default nor module.exports
  3. The demo.html uses the lib from the script tags as <script type="text/javascript" src="lib/simditor-mention.js"></script>

So, you can’t use the import syntax as you are trying above.

you should try:

require('simditor-mention/lib/simditor-mention.js')

in your main js file if you want it accessible throughout your vuejs application, or else the desired .vue file.

or

you can import the script tag in your html, like so: <script type="text/javascript" src="lib/simditor-mention.js"></script>

Leave a comment