Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin-legacy can not detect browserslist config #11100

Closed
7 tasks done
KAROTT7 opened this issue Nov 28, 2022 · 1 comment
Closed
7 tasks done

plugin-legacy can not detect browserslist config #11100

KAROTT7 opened this issue Nov 28, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@KAROTT7
Copy link
Contributor

KAROTT7 commented Nov 28, 2022

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, then postcss-preset-env will get browserslist so that convert #RGBA to RGBA(0, 0, 0, 1), but @vitejs/plugin-legacy must be set legacy({ 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 share browserslist, 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

  • visit link, npm install, npm run build, then you cannot find require("core-js/modules/es.promise.finally.js")
    for comparing
  • run node babel.js, you can see correct code in console.

System Info

System:
    OS: macOS 12.4
    CPU: (8) arm64 Apple M1
    Memory: 100.77 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.1 - /opt/homebrew/opt/node@16/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.15.0 - /opt/homebrew/opt/node@16/bin/npm
  Browsers:
    Chrome: 107.0.5304.110
    Safari: 15.5

Used Package Manager

pnpm

Logs

No response

Validations

@sapphi-red
Copy link
Member

Duplicate of #2476

@sapphi-red sapphi-red marked this as a duplicate of #2476 Nov 29, 2022
@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2022
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels Nov 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants