|
import { fileURLToPath, URL } from 'node:url' |
|
|
|
import { defineConfig } from 'vite' |
|
import vue from '@vitejs/plugin-vue' |
|
import { fileURLToPath, URL } from 'node:url' |
|
|
|
|
|
export default defineConfig({ |
|
base: '', |
|
plugins: [ |
|
vue(), |
|
], |
|
optimizeDeps: { |
|
include: ['html2canvas'] |
|
}, |
|
build: { |
|
rollupOptions: { |
|
external: ['html2canvas'] |
|
} |
|
}, |
|
server: { |
|
host: '127.0.0.1', |
|
port: 5173, |
|
proxy: { |
|
'/api': { |
|
target: 'http://localhost:7860', |
|
changeOrigin: true, |
|
} |
|
} |
|
}, |
|
css: { |
|
preprocessorOptions: { |
|
scss: { |
|
api: 'modern-compiler', |
|
additionalData: ` |
|
@use '@/assets/styles/variable.scss' as *; |
|
@use '@/assets/styles/mixin.scss' as *; |
|
` |
|
}, |
|
}, |
|
}, |
|
resolve: { |
|
alias: { |
|
'@': fileURLToPath(new URL('./src', import.meta.url)) |
|
} |
|
} |
|
}) |
|
|