| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 | import { defineConfig } from 'vite'import vue from '@vitejs/plugin-vue'import styleImport from 'vite-plugin-style-import'import vueJsx from '@vitejs/plugin-vue-jsx'import legacy from '@vitejs/plugin-legacy'// eslint-disable-next-line @typescript-eslint/no-var-requiresconst path = require('path')function resolve(dir: string) {  return path.join(__dirname, dir)}// https://vitejs.dev/config/// https://github.com/vitejs/vite/issues/1930 .env// const proxyUrl = 'https://mstutest.dayaedu.com/';const proxyUrl = 'http://47.98.131.38:8989/'// const proxyUrl = 'http://192.168.3.20:8989/' // 邹旋// const proxyUrl = 'http://192.168.3.143:8989/' // 尚科// const proxyUrl = 'http://192.168.3.26:8989/' // 刘俊驰export default defineConfig({  base: './',  plugins: [    vue(),    vueJsx(),    legacy({      targets: ['> 0.25%, not dead'],      ignoreBrowserslistConfig: true    })    // styleImport({    //   libs: [    //     {    //       libraryName: 'vant',    //       esModule: true,    //       resolveStyle: name => `../../vant/es/${name}/style`    //     }    //   ]    // })  ],  resolve: {    alias: {      '@': resolve('./src'),      '@common': resolve('./src/common'),      '@components': resolve('./src/components'),      '@store': resolve('./src/store'),      '@views': resolve('./src/views')    }  },  server: {    host: '0.0.0.0',    port: 1000,    strictPort: true,    cors: true,    proxy: {      '/api-oauth': {        target: proxyUrl,        changeOrigin: true      },      '/api-school': {        target: proxyUrl,        changeOrigin: true      },      '/api-teacher': {        target: proxyUrl,        changeOrigin: true      },      '/api-student': {        target: proxyUrl,        changeOrigin: true      },      '/api-backend': {        target: proxyUrl,        changeOrigin: true      }    }  },  build: {    rollupOptions: {      input: {        index: resolve('index.html'),        teacher: resolve('teacher.html'),        school: resolve('school.html')      }    }    // target: 'es2015',    // cssTarget: 'chrome80',    // reportCompressedSize: false,    // chunkSizeWarningLimit: 500,  }})
 |