TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

我的项目在mac上运行的很好,结果windows电脑,就一直报这个错误

解决方案: babel增加 

@babel/plugin-transform-modules-commonjs

 

 

参考文章:

https://www.cnblogs.com/dianzan/p/10676771.html 

 

 

网上搜到的答案如下:但是是老babel的解决,新的是这个 @babel/plugin-transform-modules-commonjs

 

posted @ 2020-02-02 00:26  JIN__JIN  阅读(785)  评论(0编辑  收藏  举报