-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Minify css will transform rgba to #rrggbbaa #4650
Comments
You reproduction doesn't include any vite related content but esbuild 🤔 |
I have the same problem 😢 |
since vite 2.5.0,it use esbuild to minify css will cause this issue |
Exactly, that's why I recommended to open an issue at esbuild and not here in vite |
@Shinigami92 someone has report it issue the problem is esbuild can't identify target value in import { defineConfig } from 'vite'
export default defineConfig({
build: {
// esbuild can't identify
target: ['chrome61']
}
}) |
I currently don't have the time to dive deeper into it but I found these two lines: vite/packages/vite/src/node/plugins/css.ts Line 314 in 28e4ee9
vite/packages/vite/src/node/plugins/css.ts Line 379 in 28e4ee9
Maybe someone of you could debug it or write a test and watch the |
@Shinigami92 since vite 2.5.1, set target with
import legacy from '@vitejs/plugin-legacy'
import { resolve } from 'path'
import { defineConfig } from 'vite'
import { createVuePlugin } from 'vite-plugin-vue2'
export default defineConfig({
resolve: {
alias: [
{
find: '@',
replacement: resolve(__dirname, 'src')
}
]
},
plugins: [
createVuePlugin({
jsx: true,
jsxOptions: {
compositionAPI: true,
vOn: false,
vModel: false
}
}),
legacy()
],
build: {
brotliSize: false,
target: ['chrome61']
}
}) |
@Ttou this seems unrelated to this issue. Please open a new one with a minimal reproduction so it can be properly tracked. Thanks! |
I also encountered this problem. It happend when using createRouter({
history: createWebHashHistory('/'),
routes: [
{
path: '/',
name: 'Home',
component: () => import('/src/views/Home.vue')
}
]
}); and export default defineConfig({
// ...
build: {
target: ['chrome61']
},
}) |
Describe the bug
use esbuild to minify css will transform rgba to #rrggbbaa,android webview can‘t support:#rrggbbaa
vite.config.js
setbuild.config.target
with['chrome61']
can't workbuild.js
set target with['chrome61']
can workbuild.js
Reproduction
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: