scorpio 3 vuotta sitten
vanhempi
commit
1a3779fe6d
1 muutettua tiedostoa jossa 36 lisäystä ja 35 poistoa
  1. 36 35
      vite.config.js

+ 36 - 35
vite.config.js

@@ -1,4 +1,4 @@
-import {defineConfig} from 'vite'
+import { defineConfig } from 'vite'
 import vue from '@vitejs/plugin-vue'
 import Pages from 'vite-plugin-pages'
 import Layouts from 'vite-plugin-vue-layouts'
@@ -6,39 +6,40 @@ import path from 'path'
 
 // https://vitejs.dev/config/
 export default defineConfig({
-    plugins: [
-        vue(),
-        Pages(
-            {
-                dirs: [
-                    {dir: 'src/page', baseRoute: ''},
-                    {dir: 'src/views', baseRoute: ''}
-                ],
-                exclude: ['**/component/*.vue'] // 排除组件
-            }
-        ),
-        Layouts({
-            layoutsDirs: 'src/layout',
-            defaultLayout: 'index'
-        })
-    ],
-    resolve: {
-        alias: {
-            '@': path.resolve(path.resolve(), 'src')
-        }
-    },
-    minify: 'terser',
-    server: {
-        open: true,
-        proxy: {
-            '/api': {
-                // 正式环境地址
-                // target: 'https://dev.wutongresearch.club/api',
-                // target: 'https://prod.wutongshucloud.com/api',
-                target: 'http://192.168.31.181:8110',
-                changeOrigin: true,
-                rewrite: (path) => path.replace(/^\/api/, '')
-            }
-        }
+  plugins: [
+    vue(),
+    Pages(
+      {
+        dirs: [
+          { dir: 'src/page', baseRoute: '' },
+          { dir: 'src/views', baseRoute: '' }
+        ],
+        exclude: ['**/component/*.vue'] // 排除组件
+      }
+    ),
+    Layouts({
+      layoutsDirs: 'src/layout',
+      defaultLayout: 'index'
+    })
+  ],
+  resolve: {
+    alias: {
+      '@': path.resolve(path.resolve(), 'src')
     }
+  },
+  minify: 'terser',
+
+  server: {
+    open: true,
+    proxy: {
+      '/api': {
+        // 正式环境地址
+        // target: 'https://dev.wutongresearch.club/api',
+        // target: 'https://prod.wutongshucloud.com/api',
+        target: 'http://192.168.31.181:8110',
+        changeOrigin: true,
+        rewrite: (path) => path.replace(/^\/api/, '')
+      }
+    }
+  }
 })