#How to Add a Polyfill for the Array at() Method in a Vite Project?

1 messages · Page 1 of 1 (latest)

shut tartan
#

How can I add a polyfill for the at() method in my Vite project to achieve this cross-browser functionality? I am currently using Nuxt 3.)

royal jolt
#

I hava the same question.

#

Do you have a solution

stiff veldt
#

It doesn't work well for frameworks though, like Nuxt. It may have its own ecosystem for injecting polyfills

royal jolt
#

thks,I try your solved way.

#

the way don‘t sovled question. I want question is core-js or other polyfill script . But I didn't research which polyfill script they used.

stiff veldt
#

the plugin will generate a polyfill script, but only in builds fyi. You can also use https://polyfill.io if you like

royal jolt
#

great. I'll check it out.👍

royal jolt
#

I solved this question. just need add polyfills: ['es.array.at']. at your config of legacy plugin

high glade