Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.0k views
in Technique[技术] by (71.8m points)

Babel 根据 Browserslist 引入包的疑惑

在 .browserslistrc 中指定了 safari 14
babel 的配置如下:

{
    "presets": [
        [
            "@babel/env",
            {
                "debug": true,
                "useBuiltIns": "usage",
                "corejs": "3.6.5"
            }
        ]
    ]
}

结果中引入了以下包:
require("core-js/modules/es.typed-array.uint8-array.js");
开启debug模式,得知是 safari 14 这个兼容目标导致的这个包被引入:

Added following core-js polyfills:
  es.typed-array.uint8-array { "safari":"14" }

但是不管是在 caniuse.com上查,还是用 caniuse-api 查,safari version > 6 就已经完全兼容了 typedarrays 这个 feature.

有大神能解答疑惑吗?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...