1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import { fileURLToPath, URL } from 'node:url';
- import { defineConfig } from 'vite';
- import vue from '@vitejs/plugin-vue';
- const path = require('path');
- const common = path.resolve(__dirname, '../common');
- export default defineConfig({
- plugins: [vue()],
- server: {
- port: 20001,
- proxy: {
- '/files': {
- target: 'http://basic.waityou24.cn',
- },
- '/jcyjdtglpt/v1/api': {
- target: 'http://192.168.1.113:13010',
- changeOrigin: true,
- ws: false,
- },
- '/semail/api': {
- target: 'http://192.168.1.113:16001',
- changeOrigin: true,
- ws: false,
- },
- '/studioadmin/api': {
- target: 'http://192.168.1.113:16001',
- changeOrigin: true,
- ws: false,
- },
- },
- },
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url)),
- '@common': common,
- },
- },
- css: {
- preprocessorOptions: {
- scss: {
- additionalData: `@import "@/assets/style/mixin.scss";`, // 此处全局的scss文件
- },
- },
- },
- });
|