| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
- import path from 'path'
- export default defineConfig({
- publicDir: 'static',
- plugins: [
- vue(),
- createSvgIconsPlugin({
- iconDirs: [path.resolve(process.cwd(), 'src/icons/svg')],
- symbolId: 'icon-[name]'
- })
- ],
- define: {
- __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
- },
- resolve: {
- extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
- alias: {
- '@': path.resolve(__dirname, './src'),
- 'imgs': path.resolve(__dirname, './src/assets/imgs')
- }
- },
- css: {
- preprocessorOptions: {
- scss: {
- additionalData: `@use "@/styles/variables.scss" as *;`
- }
- }
- },
- server: {
- port: 8080,
- proxy: {
- '/tenant': {
- target: 'http://114.104.160.118:18001/',
- changeOrigin: true
- },
- '/admin': {
- target: 'http://114.104.160.118:18001/',
- changeOrigin: true
- },
- '/external': {
- target: 'http://114.104.160.118:18001/',
- changeOrigin: true
- }
- }
- },
- build: {
- outDir: 'dist',
- chunkSizeWarningLimit: 3000,
- assetsDir: 'static',
- rollupOptions: {
- output: {
- chunkFileNames: 'static/js/[name]-[hash].js',
- entryFileNames: 'static/js/[name]-[hash].js',
- assetFileNames: 'static/[ext]/[name]-[hash].[ext]'
- }
- }
- }
- })
|