美文网首页
关于module.exports、require和export、

关于module.exports、require和export、

作者: 南慕瑶 | 来源:发表于2019-03-12 15:06 被阅读0次

1.开发中遇到的报错信息1:

Cannot assign to read only property 'exports' of object '#<Object>' (mix require and export)

google到的报错原因:

You can mix require and export. You can't mix import and module.exports.

#测试通过,报错解决。

2.开发中遇到的报错信息2:

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

google到答案:

https://github.com/vuejs/vue-cli/issues/2675

采用解决方案中的

其中,entities设置为了报错文件所在的文件夹。

重启,不再报错。

个人认为解决方案不算很理想,其他解决方案后续调研中。

另,参考https://github.com/webpack/webpack/issues/4039

相关文章

网友评论

      本文标题:关于module.exports、require和export、

      本文链接:https://www.haomeiwen.com/subject/waegpqtx.html