其他分享
首页 > 其他分享> > [vue问题解决]vue-cli项目引用mui.js报错Uncaught TypeError: ‘caller‘, ‘callee‘, and ‘arguments‘ properties may n

[vue问题解决]vue-cli项目引用mui.js报错Uncaught TypeError: ‘caller‘, ‘callee‘, and ‘arguments‘ properties may n

作者:互联网

引用mui.js

方案一#

原因:babel在将js文件转码为ES5时,默认使用严格模式,而在严格模式下,为了安全起见是不能用caller,callee,arguments等属性的。

解决: 修改bablerc文件的配置,让项目忽略mui.js的转码,完美解决我的问题


Copy

"ignore": [ "./src/assets/lib/mui/js/mui.js" ]

此外,如果设置了语法检查,也会各种检查第三方js的语法错误,从而报错。通过修改eslintignor文件,将对应目录下的js忽略即可

标签:vue,cli,转码,js,报错,arguments,mui
来源: https://blog.csdn.net/weixin_41374755/article/details/119484907