dcloudio / dcloudio/uni-app

不支持Array.prototype.at方法,是否有配置添加polyfills,使用过vite的插件引入,但打包成app后是不支持vite的方式的

Open
#4,470 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
41.6k
Forks
3.7k
Avg merge
7h 6m
Merged PRs (30d)
6

Description

**问题描述**
不支持Array.prototype.at方法,是否有配置添加polyfills,使用过vite的插件引入,但打包成app后是不支持vite的方式的,在文档里找到说对标Chrome83,如果需要用更新的语法有没有解决方案?在文档内没找到解决方案。

const a = [1,2].at(-1);

**预期结果**
a === 2

**实际结果**
[1,2].at is not function

**系统信息:**
- 发行平台: [APP]
- 操作系统 [Android 11]
- HBuilderX版本 [3.8.7.28238783]
- uni-app版本 [3.8.7(vue3)]
- 设备信息 [红米K40]

**补充信息**
不支持Array.prototype.at方法

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.