You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
797 B
JavaScript

import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import path from 'path';
// https://vite.dev/config/
export default defineConfig({
base: './', server: {
host: '0.0.0.0', port: 5173, open: true, proxy: {
'/dev-api': {
target: 'http://192.168.1.123:5000',
changeOrigin: true,
ws: true,
secure: false,
rewrite: (path) => path.replace(new RegExp('^' + '/dev-api'), '')
}
}
}, plugins: [vue(), vueJsx()], resolve: {
alias: {
'~': path.resolve(__dirname, './'), '@': path.resolve(__dirname, 'src')
}, extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
},
})