| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 | 
							- const { resolve } = require('path')
 
- import { defineConfig } from 'vite'
 
- import vue from "@vitejs/plugin-vue";
 
- import { VitePWA } from 'vite-plugin-pwa'
 
- const vueJsx = require('@vitejs/plugin-vue-jsx')
 
- const legacy = require('@vitejs/plugin-legacy')
 
- const proxyUrl = "https://test.dayaedu.com/"; // test 环境
 
- // https://vitejs.dev/config/
 
- export default defineConfig({
 
-   base: "./",
 
-   // '/src': resolve(__dirname, './src')
 
-   resolve: {
 
-     alias: {
 
-       // '/src': resolve(__dirname, './src'),
 
-     }
 
-   },
 
-   css: {
 
-     preprocessorOptions: {
 
-       less: {
 
-         // lessOptions: {
 
-         //   modifyVars: {
 
-         //     '@blue': '#14928A',
 
-         //     '@nav-bar-icon-color': '#14928A'
 
-         //   }
 
-         // }
 
-       }
 
-     }
 
-   },
 
-   plugins: [
 
-     vue(),
 
-     vueJsx(),
 
-     legacy({
 
-       targets: ["> 0.25%, not dead"],
 
-       ignoreBrowserslistConfig: true,
 
-     }),
 
-     VitePWA({
 
-       injectRegister: "auto",
 
-       workbox: {
 
-         cleanupOutdatedCaches: true
 
-       },
 
-       base: './',
 
-       manifest: {
 
-         name: '管乐迷',
 
-         short_name: '管乐迷',
 
-         theme_color: '#01C1B5',
 
-         icons: [
 
-           {
 
-             src: './pwa-192x192.png',
 
-             sizes: '192x192',
 
-             type: 'image/png',
 
-           },
 
-           {
 
-             src: './pwa-512x512.png',
 
-             sizes: '512x512',
 
-             type: 'image/png',
 
-           },
 
-         ],
 
-       },
 
-     })
 
-   ],
 
-   server: {
 
-     cors: true,
 
-     proxy: {
 
-       '/api-web': {
 
-         target: proxyUrl,
 
-         changeOrigin: true
 
-       },
 
-       '/api-auth': {
 
-         target: proxyUrl,
 
-         changeOrigin: true
 
-       }
 
-     }
 
-   }
 
- });
 
 
  |