Vue的报错:Cannot assign to read only property 'exports' of object

运行了一个Vue+webpack的 vue仿新闻网站
报错如下:
Vue的报错:Cannot assign to read only property 'exports' of object
报错位置在index.js文件
Vue的报错:Cannot assign to read only property 'exports' of object

通过转论坛发现了最终的问题所在,在webpack打包的时候,可以在js文件中混用require和export。但是不能混用import 以及module.exports。因为webpack 2中不允许混用import和module.exports,所以我的解决办法就是统一改成ES6的方式编写即可.
所以我将
Vue的报错:Cannot assign to read only property 'exports' of object
改为
Vue的报错:Cannot assign to read only property 'exports' of object然后cnpm run dev 就跑起来了!