1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- /**
- * @Description:
- * @version:
- * @Author: 北京四维空间数码科技有限公司-研发部
- * @Date: 2022-12-02 17:26:06
- * @LastEditors: 北京四维空间数码科技有限公司-研发部
- * @LastEditTime: 2023-05-10 11:47:26
- */
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import path from 'path';
- const HOST = "0.0.0.0"
- const REPLACEMENT = `${path.resolve(__dirname, './src')}/`
- export default defineConfig({
- base: "/",
- // server: {
- // host: HOST,
- // port: process.env.PORT,
- // },
- server: {
- host: HOST,
- open: true,
- port: process.env.PORT,
- proxy: {
- "/api": {
- // target: "http://192.168.100.252:8080",
- // target: "http://192.168.60.42:5004",
- target: "http://192.168.60.42:8080",
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, ""),
- },
- "/dzzapi": {
- // target: "http://192.168.100.252:8080",
- // target: "http://192.168.60.42:9206",
- target: "http://192.168.60.42:8080",
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/dzzapi/, ""),
- },
- },
- },
- resolve: {
- alias: [{
- find: '@/',
- replacement: REPLACEMENT,
- },
- {
- find: 'src/',
- replacement: REPLACEMENT,
- }, {
- find: '~@',
- replacement: REPLACEMENT,
- },
- ],
- },
- plugins: [
- vue(),
- ],
- build: {
- minify: 'terser',
- terserOptions: {
- compress: {
- drop_console: true,
- drop_debugger: true,
- },
- },
- },
- })
|