docs: switch Polyfill.io to Cloudflare hosted version (#17567)

This commit is contained in:
Parham Negahdar 2024-06-25 23:08:10 -04:00 committed by GitHub
parent 1b0979f44c
commit a97e0590b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,7 +13,7 @@ The production bundle assumes support for modern JavaScript. By default, Vite ta
You can specify custom targets via the [`build.target` config option](/config/build-options.md#build-target), where the lowest target is `es2015`.
Note that by default, Vite only handles syntax transforms and **does not cover polyfills**. You can check out [Polyfill.io](https://polyfill.io/) which is a service that automatically generates polyfill bundles based on the user's browser UserAgent string.
Note that by default, Vite only handles syntax transforms and **does not cover polyfills**. You can check out [Polyfill JS](https://cdnjs.cloudflare.com/polyfill/) which is a service that automatically generates polyfill bundles based on the user's browser UserAgent string.
Legacy browsers can be supported via [@vitejs/plugin-legacy](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy), which will automatically generate legacy chunks and corresponding ES language feature polyfills. The legacy chunks are conditionally loaded only in browsers that do not have native ESM support.