vuejs / create-vue

🛠️ The recommended way to start a Vite-powered Vue project
Other
3.83k stars 436 forks source link

can not use `[].at` at project #620

Closed zhangenming closed 1 week ago

zhangenming commented 1 week ago

image

Describe the bug

Expected behavior

How to reproduce

lean-dev commented 1 week ago

Hi, this is no bug.

As stated in the comment:

Support for newer versions of language built-ins are left for the users to include

Add the following line in your tsconfig.app.json in the compilerOptions (e.g. at line 8):

"lib": ["ES2023", "DOM", "DOM.Iterable"],

At least ES2022 must be chosen.