Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/434.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 加入“;“没有死”;在巴贝尔浏览器列表中,即使浏览器相同,也会产生不同的结果?_Javascript_Webpack_Babeljs - Fatal编程技术网

Javascript 加入“;“没有死”;在巴贝尔浏览器列表中,即使浏览器相同,也会产生不同的结果?

Javascript 加入“;“没有死”;在巴贝尔浏览器列表中,即使浏览器相同,也会产生不同的结果?,javascript,webpack,babeljs,Javascript,Webpack,Babeljs,我的配置是: last 10 versions, not < 0.1%, not dead, not ie > 0, not op_mini all, not edge < 70, not samsung < 9 运行npx browserslist会为以下两种情况产生完全相同的结果: and_chr 87 and_ff 83 and_qq 10.4 and_uc 12.12 chrome 87 chrome 86 chrome 85 chrome 84 chrome

我的配置是:

last 10 versions, not < 0.1%, not dead, not ie > 0, not op_mini all, not edge < 70, not samsung < 9
运行
npx browserslist
会为以下两种情况产生完全相同的结果:

and_chr 87
and_ff 83
and_qq 10.4
and_uc 12.12
chrome 87
chrome 86
chrome 85
chrome 84
chrome 83
chrome 81
chrome 80
chrome 79
chrome 77
edge 87
edge 86
firefox 83
firefox 82
firefox 81
firefox 78
ios_saf 14.0-14.2
ios_saf 13.4-13.7
ios_saf 13.3
ios_saf 13.0-13.1
ios_saf 12.2-12.4
ios_saf 12.0-12.1
ios_saf 11.3-11.4
ios_saf 10.3
opera 72
opera 71
safari 14
safari 13.1
safari 13
safari 12.1
samsung 13.0
samsung 12.0
samsung 11.1-11.2
samsung 9.2

但是,Webpack+Babel的捆绑包大小要大20%,没有
not dead
。为什么会有差异?

最近10个版本中的一些版本已经失效,并且在添加
未失效时被删除

您是说
npx browserslist
包含被忽略的浏览器?这样看来,您的配置不明确,因此不同的工具会有不同的结果
and_chr 87
and_ff 83
and_qq 10.4
and_uc 12.12
chrome 87
chrome 86
chrome 85
chrome 84
chrome 83
chrome 81
chrome 80
chrome 79
chrome 77
edge 87
edge 86
firefox 83
firefox 82
firefox 81
firefox 78
ios_saf 14.0-14.2
ios_saf 13.4-13.7
ios_saf 13.3
ios_saf 13.0-13.1
ios_saf 12.2-12.4
ios_saf 12.0-12.1
ios_saf 11.3-11.4
ios_saf 10.3
opera 72
opera 71
safari 14
safari 13.1
safari 13
safari 12.1
samsung 13.0
samsung 12.0
samsung 11.1-11.2
samsung 9.2