|
|
|
|
@ -3,7 +3,12 @@ import { |
|
|
|
|
loadEnv |
|
|
|
|
} from 'vite'; |
|
|
|
|
import { resolve } from 'path' |
|
|
|
|
|
|
|
|
|
import path from 'path' |
|
|
|
|
import createVitePlugins from './vite/plugins'; |
|
|
|
|
import { |
|
|
|
|
createSvgIconsPlugin |
|
|
|
|
} from 'vite-plugin-svg-icons' |
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
|
export default ({ |
|
|
|
|
mode, |
|
|
|
|
@ -54,7 +59,7 @@ export default ({ |
|
|
|
|
port: 2888, |
|
|
|
|
proxy: { |
|
|
|
|
'/api': { |
|
|
|
|
target: 'http://192.168.0.112', |
|
|
|
|
target: 'http://192.168.0.105', |
|
|
|
|
//target: 'https://saber3.bladex.cn/api',
|
|
|
|
|
changeOrigin: true, |
|
|
|
|
rewrite: path => path.replace(/^\/api/, ''), |
|
|
|
|
@ -78,7 +83,11 @@ export default ({ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
plugins: createVitePlugins(env, command === 'build'), |
|
|
|
|
plugins:[ createVitePlugins(env, command === 'build'),
|
|
|
|
|
createSvgIconsPlugin({ |
|
|
|
|
iconDirs: [path.resolve(process.cwd(), 'src/assets/svg')], |
|
|
|
|
symbolId: 'icon-[dir]-[name]' |
|
|
|
|
})], |
|
|
|
|
build: buildConfig, |
|
|
|
|
optimizeDeps: { |
|
|
|
|
esbuildOptions: { |
|
|
|
|
|