chenyinkai / blog

学习笔记,技术心得,疑难困惑,生活总结。喜欢的请star。。
42 stars 1 forks source link

vue 引入插件 报错 Cannot assign to read only property 'exports' of object '#<Object>' #18

Closed chenyinkai closed 7 years ago

chenyinkai commented 7 years ago

webpack可以使用require和export ,但是不能混合使用import 和module.exports ,不然会报错Cannot assign to read only property 'exports' of object '#'

image

在vue中引入swiper时,一直报错;

解决: 原因: transform-runtime adds import to your files 删除babelrc的插件一项的transfrom-runtime:

tim 20170822130210