前言:作为一名程序员遇到Bug总是在所难免的,但是记住"不二过",今天在Vue开发中遇到了一个报错让我纠结了许久,找了许久,

报错的原因是使用了mui导入其js文件导致的.

报错信息如下:

Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them:

根据报错大概判断是由于webpack下的严格模式导致的,因为在webpack中都是严格模式的因此我们要借助软件来解决这个错误

解决方法:

  1.在npm官网下载:npm install babel-plugin-transform-remove-strict-mode

  2.在.bablerc文件中加入"plugins"["transform-remove-strict-mode"]

 

到此你就会发现不会出现这个错误了.

 

相关文章:

  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
  • 2022-01-22
  • 2021-07-02
  • 2021-07-18
  • 2022-12-23
  • 2021-07-05
猜你喜欢
  • 2021-12-29
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2021-04-16
  • 2021-09-12
  • 2021-12-11
相关资源
相似解决方案