首页 > 其他 > 详细

Vue - 一个配置文件引发的问题

时间:2021-04-22 23:52:23      阅读:21      评论:0      收藏:0      [点我收藏+]

我在虚拟机中访问主机中的Vue网站,发现不能正常访问,打开浏览器调试模式,看到以下错误:

Uncaught SyntaxError: Block-scoped declarations (let, const, functionUncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode, class) not yet supported outside strict mode

错误原因:引入的配置文件需要严格模式。

解决方法:在导致错误的文件中加入:

"use strict";

参考:

https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Strict_mode

Vue - 一个配置文件引发的问题

原文:https://www.cnblogs.com/sunylat/p/14691262.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!