| 1234567891011121314151617181920212223242526272829303132333435363738 |
- import vue from '@vitejs/plugin-vue'
- import { defineConfig, loadEnv } from 'vite'
- import { resolve } from 'path'
- import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
- export default ({ mode }) => {
- return defineConfig({
- base: './',
- server: {
- host: '0.0.0.0',
- port: 15438,
- strictPort: true,
- // proxy: {
- // '/api': {
- // target: loadEnv(mode, process.cwd()).VITE_PROXY_URL,
- // changeOrigin: true,
- // rewrite: path => path.replace(/^\/api/, ''),
- // secure: false,
- // headers: {
- // Referer: 'https://example.com'
- // }
- // }
- // }
- },
- resolve: {
- alias: {
- '@': resolve(__dirname, 'src')
- }
- },
- plugins: [
- vue(),
- createSvgIconsPlugin({
- iconDirs: [resolve(__dirname, './src/assets/icons')],
- symbolId: 'icon-[dir]-[name]'
- })
- ]
- })
- }
|