CreatorCenter_OOIN/vite.config.js

38 lines
955 B
JavaScript
Raw Normal View History

2025-05-23 08:53:43 +08:00
import { defineConfig, loadEnv } from 'vite';
2025-05-09 07:03:19 +08:00
import react from '@vitejs/plugin-react';
import path from 'path';
2025-05-08 10:39:32 +08:00
// https://vite.dev/config/
2025-05-23 08:53:43 +08:00
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd());
return {
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
css: {
preprocessorOptions: {
scss: {
quietDeps: true,
outputStyle: 'compressed',
},
},
devSourcemap: false,
},
build: {
cssCodeSplit: false,
minify: true,
2025-05-09 07:03:19 +08:00
},
2025-05-23 08:53:43 +08:00
server: {
proxy: {
'/api': {
target: env.VITE_API_URL || 'http://81.69.223.133:8008',
changeOrigin: true,
},
2025-05-15 10:42:39 +08:00
},
},
2025-05-23 08:53:43 +08:00
};
2025-05-09 07:03:19 +08:00
});