解决 Cannot assign to read only property 'exports' of object '#' 问题

如果是 babel6,可以尝试使用:

 

https://www.npmjs.com/package/babel-plugin-transform-es2015-modules-commonjs

 

先安装:

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

 

然后再 .babelrc 中添加该插件

 "plugins": ["transform-es2015-modules-commonjs"]

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 Cannot assign to read only property 'exports' of object 解决办法 Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#' vue 项目启动报错:Cannot assign to read only property 'exports' of object '#' sdk uncaught third Error Cannot assign to read only property 'constructor' of object '#' (小程序) vue项目中引入 html2canvas ,控制台报错 Cannot assign to read only property 'className' of object '#< SVGSVGElement >' 解决Cannot read property 'style' of null中样式问题 前端Cannot read property 'disabled' of null 问题解决 Cannot read property 'disabled' of null 问题解决 echarts Cannot read property 'getAttribute' of null 问题的解决方法 Cannot read property 'resetFields' of undefined 问题及引申
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM