31 lines
625 B
JavaScript
31 lines
625 B
JavaScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8888',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
|
},
|
|
},
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
quietDeps: true, // Unix
|
|
silenceDeprecations: [
|
|
'color-functions',
|
|
'global-builtin',
|
|
'import',
|
|
'legacy-js-api',
|
|
'if-function',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
});
|