前言:作為一名程序員遇到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":
到此你就會發現不會出現這個錯誤了.