I want to use the browserslist rule cover 99.5%
so I can cover most of the users browsers.
I am using vite and I tried to use @vite/plugin-legacy (https://www.npmjs.com/package/@vitejs/plugin-legacy) to make the transpilation/polyfills to make my bundle compatible with older browsers.
Here is my config:
# vite.config.ts
legacy({
targets: ['cover 99.5%'],
modernPolyfills: true,
polyfills: true,
}),
But when I ctrl+f the build code it still show me reference of many features that is incompatible for older browsers.
E.g I see the use of Date.now()
but it’s not compatible with IE8.
What I’m missing ?
Am I dreaming and vite is not able to transpile my code like that so easily ?