|
@@ -1,5 +1,6 @@
|
|
|
import { defineConfig } from 'vite'
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
+import config from './config.js'
|
|
|
|
|
|
import { resolve } from 'path'
|
|
|
|
|
@@ -44,23 +45,23 @@ export default defineConfig({
|
|
|
rewrite: path => path.replace(/^\/api/, '')
|
|
|
},
|
|
|
'/swkk': {
|
|
|
- target: 'https://test.4dkankan.com',
|
|
|
+ target: config.dev ? 'https://test.4dkankan.com' : 'https://www.4dkankan.com',
|
|
|
changeOrigin: true,
|
|
|
rewrite: path => path.replace(/^\/swkk/, '')
|
|
|
},
|
|
|
'/service': {
|
|
|
- target: 'https://test.4dkankan.com',
|
|
|
+ target: config.dev ? 'https://test.4dkankan.com' : 'https://www.4dkankan.com',
|
|
|
changeOrigin: true,
|
|
|
},
|
|
|
|
|
|
|
|
|
'/swss': {
|
|
|
- target: 'https://uat-laser.4dkankan.com/uat',
|
|
|
+ target: config.dev ? 'https://uat-laser.4dkankan.com/uat' : 'https://laser.4dkankan.com',
|
|
|
changeOrigin: true,
|
|
|
rewrite: path => path.replace(/^\/swss/, '')
|
|
|
},
|
|
|
'/laser': {
|
|
|
- target: 'https://uat-laser.4dkankan.com',
|
|
|
+ target: config.dev ? 'https://uat-laser.4dkankan.com' : 'https://laser.4dkankan.com',
|
|
|
changeOrigin: true,
|
|
|
rewrite: path => path.replace(/^\/swss/, '')
|
|
|
},
|