Cannot assign to read only property 'exports' of object '#'

网上有很多解决办法,但都不尽如人意。这里介绍一种比较好的兼容办法
需要引入插件

npm install babel-plugin-transform-es2015-modules-commonjs
然后在 babelrc中配置

{ "plugins": ["transform-es2015-modules-commonjs"] }
即可解决

来源链接:https://www.jianshu.com/p/837e6b7d0ce0

相关文章:

  • 2021-09-18
  • 2021-07-05
  • 2021-07-28
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2021-08-23
猜你喜欢
  • 2022-12-23
  • 2021-04-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案
粤ICP备22038628号Powered By WordPress