开发环境正常,生产环境报错 Super expression must either be null or a function, not undefined

851 阅读1分钟
  • 原因:项目中使用了quill-editor, 富文本组件,需要用到图片缩放功能,于是在组件中使用了BlotFormatter模块,开发环境正常使用,上线就一直报这个错误。

  • 解决办法,替换为import 'quill-image-resize-module/image-resize.min.js'

  • 另外说一下,怎么排查到的这个错误,直接在main.js中,取消挂载整个App, 打包运行,依然报错。那么错误就是在main.js中了,一句一句注释,打包,本地通过serve静态服务运行。