解決 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