| 123456789101112131415161718192021222324252627282930313233343536373839 |
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import path from 'path';
- import legacy from '@vitejs/plugin-legacy'
- // https://vitejs.dev/config/
- export default defineConfig({
- plugins: [
- vue(),
- legacy({
- targets: ['ie >= 8'],
- additionalLegacyPolyfills: ['regenerator-runtime/runtime']
- })
- ],
- // build: {
- // outDir: 'E:\\Projects\\chemopump\\tuoren-pump-chemo\\src\\main\\resources\\static',
- // emptyOutDir: true,
- // },
- resolve: {
- alias: {
- '@': path.resolve(__dirname, './src')
- }
- },
- server: {
- host: '0.0.0.0',
- port: 3000,
- proxy: {
- '/forward-service': {
- target: 'http://192.168.103.33:8585/',
- // target: 'http://192.168.100.115:8585/', // 生产环境
- changeOrigin: true,
- rewrite: (path) => {
- // console.log('path', path)
- return path.replace(/^\/forward-service/, '')
- }
- }
- }
- }
- })
|