38 lines
626 B
TypeScript
38 lines
626 B
TypeScript
import path from 'node:path'
|
|
import Vue from '@vitejs/plugin-vue'
|
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 5174,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://127.0.0.1:8000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
|
|
resolve: {
|
|
alias: {
|
|
'~/': `${path.resolve(__dirname, 'src')}/`,
|
|
},
|
|
},
|
|
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
additionalData: `@use "~/styles/element/index.scss" as *;`,
|
|
api: 'modern-compiler',
|
|
},
|
|
},
|
|
},
|
|
|
|
plugins: [
|
|
Vue(),
|
|
],
|
|
})
|