test: 暂存

This commit is contained in:
2024-09-18 04:17:11 +08:00
parent a36a390d25
commit b838488776
19 changed files with 683 additions and 142 deletions

View File

@@ -1,25 +1,28 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from 'tailwindcss'
import autoprefixer from 'autoprefixer'
import path from 'path'
import nesting from 'tailwindcss/nesting'
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from 'tailwindcss';
import autoprefixer from 'autoprefixer';
import path from 'path';
import nesting from 'tailwindcss/nesting';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [
react(),
],
css: {
postcss: {
plugins: [nesting, tailwindcss, autoprefixer]
}
plugins: [nesting, tailwindcss, autoprefixer],
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
'@': path.resolve(__dirname, './src'),
},
},
define: {
DEV_SERVER: JSON.stringify(process.env.NODE_ENV === 'development')
DEV_SERVER: JSON.stringify(process.env.NODE_ENV === 'development'),
},
server: {
port: 6010,
@@ -27,8 +30,8 @@ export default defineConfig({
'/api': {
target: 'http://localhost:4000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/api')
}
}
}
})
rewrite: (path) => path.replace(/^\/api/, '/api'),
},
},
},
});