码迷,mamicode.com
首页 > 其他好文 > 详细

关于Mui严格模式下的报错解决方案

时间:2018-12-08 19:17:22      阅读:349      评论:0      收藏:0      [点我收藏+]

标签:npm   方法   nts   关于   typeerror   babel   出现   string   type   

前言:作为一名程序员遇到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"]

 

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

 

关于Mui严格模式下的报错解决方案

标签:npm   方法   nts   关于   typeerror   babel   出现   string   type   

原文地址:https://www.cnblogs.com/learningPHP-students2018/p/10088570.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!