plugin-legacy
can not detect browserslist config
#11100
Labels
duplicate
This issue or pull request already exists
plugin-legacy
can not detect browserslist config
#11100
Describe the bug
I am develop a app runs on chrome 61 which don't support
es.promise.finally
and css property#RGBA
by vite + tailwindcss + postcss.I set
"browserslist": [ "chrome 61" ]
in package.json, thenpostcss-preset-env
will getbrowserslist
so that convert#RGBA
toRGBA(0, 0, 0, 1)
, but@vitejs/plugin-legacy
must be setlegacy({ targets: 'chrome 61' })
, or can not import 'require("core-js/modules/es.promise.finally.js");'.Because '@vitejs/plugin-legacy' have default value 'defaults', it should be
undefined
, I think all tools should sharebrowserslist
, it's a better way.Reproduction
https://stackblitz.com/edit/vitejs-vite-3zzbrs?file=src%2FApp.jsx,vite.config.js,babel.js,dist%2Fassets%2Findex.734b493c.js&terminal=dev
Steps to reproduce
require("core-js/modules/es.promise.finally.js")
for comparing
node babel.js
, you can see correct code in console.System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: