29 lines
568 B
JavaScript
29 lines
568 B
JavaScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
const apiPort = process.env.API_PORT || '1551';
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
css: {
|
|
preprocessorOptions: {
|
|
less: {
|
|
javascriptEnabled: true,
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 1552,
|
|
proxy: {
|
|
'/api': {
|
|
target: `http://localhost:${apiPort}`,
|
|
changeOrigin: true,
|
|
},
|
|
'/uploads': {
|
|
target: `http://localhost:${apiPort}`,
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|