WangYuLue / image-conversion

A simple and easy-to-use JS image convert tools, which can specify size to compress the image.
https://demo.wangyulue.com/image-conversion/
MIT License
909 stars 140 forks source link

在vue production 环境变量打包的时候会报这个错误 cannot set property imageConvertion of undefined #23

Closed bingbingq closed 4 years ago

bingbingq commented 4 years ago

import * as imageConversion from 'image-conversion'

imageConversion.compressAccurately(file.raw, 90).then(res => { imageConversion.compress(file.raw, { quality: 0.6, type: "image/jpeg", width: 20, scale: 0.5, }) })

WangYuLue commented 4 years ago

能否提供更多的信息,我刚刚用 vue-cli 建了一个Demo项目,点击这里查看Demo,并且打包后测试,并没有发现这个问题。