Replies: 4 comments 2 replies
-
I doubt it because those vite build target strings follow the esbuild target format which is different than the browserlist queries:
|
Beta Was this translation helpful? Give feedback.
-
For anyone that stumbles across this:
|
Beta Was this translation helpful? Give feedback.
-
I use this package to pass browserslist config to esbuild target option: // vite.config.*
import { defineConfig } from 'vite'
import browserslistToEsbuild from 'browserslist-to-esbuild'
export default defineConfig({
build: { target: browserslistToEsbuild() }
}) |
Beta Was this translation helpful? Give feedback.
-
It wasn’t clear to me neither how much of Browserslist was supported by Vite, so I did some researches on top of what you all shared and wrote an article about it. I think Vite could leverage the |
Beta Was this translation helpful? Give feedback.
-
The documentation isn't clear on whether Vite supports configuring a browserslist via package.json or .browserslistrc. It only says:
Are the conventional ways of defining browserslist supported or do we need to use
build.target
to specify the browserslist? BTW, I'm not trying to target legacy browsers. Thanks!Beta Was this translation helpful? Give feedback.
All reactions