surmon-china / vue-quill-editor

@quilljs editor component for @vuejs(2)
https://github.surmon.me/vue-quill-editor
MIT License
7.39k stars 1.03k forks source link

Encountering import of undefined error #367

Open unickortega opened 5 years ago

unickortega commented 5 years ago

https://github.com/surmon-china/vue-quill-editor/blob/7e424311284e99679f540cdbdf32a827db4fa76c/examples/04-example.vue#L35

Hey man! Thank you very much for making thing project. It's very helpful. I just wanted to help by pointing out an issue.

quill-image-resize-module dependency is prompting an error.

image

But I have found a solution. I defined the window.Quill global variable and it seems to work fine.

Maybe you can include this in your documentation. image

That's all man. Thank you and keep up the good work!

ThunderLightGod commented 5 years ago

vue2.X 版本webpack配置引入第三方插件 var webpack = require('webpack'); module.exports = { plugins: [ new webpack.ProvidePlugin({ $: 'jquery', //引入jquery jQuery: 'jquery', moment: 'moment' //引入moment.js时间处理插件 }), ] } vue-cli3.X 版本webpack配置引入第三方插件 const webpack = require('webpack') module.exports = { chainWebpack: config => { config.plugin('provide').use(webpack.ProvidePlugin, [{ $: 'jquery', jquery: 'jquery', jQuery: 'jquery', 'window.jQuery': 'jquery' }]); } }