Closed
Description
Describe the bug
use esbuild to minify css will transform rgba to #rrggbbaa,android webview can‘t support:#rrggbbaa
- in
vite.config.js
setbuild.config.target
with['chrome61']
can't work - create
build.js
set target with['chrome61']
can work
build.js
const esbuild = require('esbuild')
esbuild.buildSync({
entryPoints: ['app.css'],
minify: true,
target: ['chrome61'],
outfile: 'out.css'
})
Reproduction
#app {
background-color: rgba(0, 0, 0, 0.1);
}
const esbuild = require('esbuild')
esbuild.buildSync({
entryPoints: ['app.css'],
minify: true,
outfile: 'out.css'
})
#app{background-color:#0000001a}
System Info
System:
OS: Windows 10 10.0.19043
CPU: (12) x64 Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz
Memory: 9.96 GB / 15.84 GB
Binaries:
Node: 14.17.3 - C:\Program Files\nodejs\node.EXE
npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1023.0), Chromium (92.0.902.73)
Internet Explorer: 11.0.19041.906
npmPackages:
vite: ^2.5.0 => 2.5.0
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.