admin管理员组文章数量:1307120
we are using webpack 4 and upgraded from babel 6 to 7, webpack succeeds and builds the output, but seeing below error when app is run,
Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
bablerc
{
"presets": [
"@babel/react" ,
"@babel/env"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
[
"@babel/plugin-transform-spread",
{
"loose": true
}
]
]
}
webpack
{
test: /\.(js|jsx)$/,
exclude: /(node_modules|bower_components)/,
use: ['babel-loader', 'eslint-loader']
},
have tried adding - "sourceType": "unambiguous" to babelrc as advised in - How do I fix 'Cannot assign to read only property 'exports' of object '#<Object>' when adding a 2nd function to module.exports?, it did not work. any help is appreciated.
本文标签:
版权声明:本文标题:reactjs - Uncaught TypeError: Cannot assign to read only property 'exports' of object on runtime with webpack4 a 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741819329a2399269.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论