feat: change to center and clean code
This commit is contained in:
@@ -5,13 +5,13 @@ import autoprefixer from 'autoprefixer';
|
||||
import path from 'path';
|
||||
import nesting from 'tailwindcss/nesting';
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isKV = process.env.VITE_USE_KV === 'true';
|
||||
const isKV = process.env.VITE_USE_KV === 'true'; // use kevisual service as backend
|
||||
const unamiPlugin = {
|
||||
name: 'html-transform',
|
||||
transformIndexHtml(html: string) {
|
||||
return html.replace(
|
||||
'</head>',
|
||||
`<script defer src="https://umami.xiongxiao.me/script.js" data-website-id="aeea5ee5-df79-4e78-8c0d-a9f26db23695"></script></head>`,
|
||||
`<script defer src="https://umami.xiongxiao.me/script.js" data-website-id="79e7aa98-9e6e-4eef-bc8b-9cbd0ecb11c3"></script></head>`,
|
||||
);
|
||||
},
|
||||
};
|
||||
@@ -48,7 +48,16 @@ export default defineConfig({
|
||||
css: {
|
||||
postcss: {
|
||||
// @ts-ignore
|
||||
plugins: [nesting, tailwindcss, autoprefixer],
|
||||
plugins: [
|
||||
nesting({
|
||||
// 兼容 tailwindcss 4.0
|
||||
tailwindcss: {
|
||||
config: './tailwind.config.js',
|
||||
},
|
||||
}),
|
||||
tailwindcss,
|
||||
autoprefixer,
|
||||
],
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
@@ -60,9 +69,13 @@ export default defineConfig({
|
||||
DEV_SERVER: JSON.stringify(process.env.NODE_ENV === 'development'),
|
||||
},
|
||||
server: {
|
||||
port: 6010,
|
||||
port: 6020,
|
||||
host: '0.0.0.0',
|
||||
proxy: {
|
||||
'/system/lib': {
|
||||
target: 'https://kevisual.xiongxiao.me',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/api': {
|
||||
target: 'http://localhost:4002',
|
||||
changeOrigin: true,
|
||||
|
||||
Reference in New Issue
Block a user