项目报错:
TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
项目结构是:react+redux+antd
路由用的是browser history
目前是版本如:
"react-redux": "^5.0.5",
"react-router": "^4.1.2",
"react-router-dom": "^4.1.2",
"react-router-redux": "^4.0.8",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0",
运行报错:
请问是需要配置哪里吗?
将 commonJS 的
module.exports = ...
改为 ES6 的export default ...
。但是我没有混用,还是出现了这个问题,我的代码:
index.vue:
以上情况没有混用,可是依然报错,还望大佬解答一下。
第二种报错情况:
import ... from
混用:参考:
Cannot assign to read only property 'exports' of object '#<Object>' (mix require and export)
Babel 7 Upgrading creating error: “TypeError: Cannot assign to read only property 'exports' of object '#<Object>'”