mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 05:51:56 +08:00
34 lines
852 B
TypeScript
34 lines
852 B
TypeScript
import reactRefresh from '@vitejs/plugin-react-refresh'
|
|
import tsConfigPath from 'vite-tsconfig-paths'
|
|
import windiCSS from 'vite-plugin-windicss'
|
|
import { defineConfig } from 'vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
reactRefresh(),
|
|
tsConfigPath(),
|
|
windiCSS(),
|
|
// https://github.com/vitejs/vite/issues/2144
|
|
{
|
|
name: 'remove-css-in-js',
|
|
enforce: 'post',
|
|
transform(_, id) {
|
|
if (id.endsWith('.scss') || id.endsWith('.css')) {
|
|
return ''
|
|
}
|
|
},
|
|
}
|
|
],
|
|
base: './',
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
additionalData: '@use "sass:math"; @import "src/styles/variables.scss";'
|
|
}
|
|
}
|
|
},
|
|
build: {
|
|
minify: 'esbuild'
|
|
}
|
|
})
|