原文:Cannot assign to read only property 'exports' of object '#'

在webpack项目中使用 babel plugin transform runtime时,报错 ERROR in Error: E: workdata webpackVue node modules babel runtime . . babel runtime helpers typeof.js : module.exports typeof TypeError: Cannot assign ...

2019-06-02 22:48 0 2223 推荐指数:

查看详情

Cannot assign to read only property 'exports' of object 解决办法

大致是说,在webpack打包的时候,可以在js文件中混用require和export。但是不能混用import 以及module.exports。 因为webpack 2中不允许混用import和module.exports, 解决办法有两种: 一、统一改成ES6的方式编写即可 ...

Tue Dec 31 07:02:00 CST 2019 0 1378
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM