您的位置:首页 > Web前端 > Vue.js

vue 运行时报错: Cannot assign to read only property 'exports' of object 'Object'

2019-06-09 18:59 435 查看

vue运行报错error:Cannot assign to read only property ‘exports’ of object ‘#’
用weex做项目的时候,npm start 之后一直报错error:Cannot assign to read only property ‘exports’ of object ‘#’ ,查了好多资料好像是export和import共用了导致不兼容引起的

试了好多方法都不行,最后找到个办法,试了一下可以用,特此记录:

npm install babel-plugin-transform-es2015-modules-commonjs

然后在 babelrc中配置

{ “plugins”: [“transform-es2015-modules-commonjs”] }

即可解决

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐