mirror of
https://github.com/Funkoala14/CreatorCenter_OOIN.git
synced 2025-06-07 11:18:13 +08:00
38 lines
955 B
JavaScript
38 lines
955 B
JavaScript
import { defineConfig, loadEnv } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
|
|
// https://vite.dev/config/
|
|
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,
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: env.VITE_API_URL || 'http://81.69.223.133:8008',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|