用vue-cli搭建的project,babel采用的babel-loader的默认设置
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test')]
},
发现网页写好后在老的iOS机器上(比如iPhone6)看不了
Debug了一下,发现是提示
SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode.
感觉应该是const没有被babel转成var,我去编译好的js里搜了一下,的确是有很多的const,但这些const只存在于
"use strict";
eval("xxxx");
这些code里,请问是不是我的设置里面有什么问题?如何去debug这个问题呢,有点头疼
--
FROM 116.228.132.*