2025-04-13 14:22:32 +08:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import vue from '@vitejs/plugin-vue';
|
|
|
|
import { resolve } from 'path';
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2025-04-26 13:15:30 +08:00
|
|
|
plugins: [vue({
|
|
|
|
include: [/\.vue$/, /\.md$/] // <-- allows Vue to compile Markdown files
|
|
|
|
})],
|
2025-04-13 14:22:32 +08:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@': resolve(__dirname, 'src'),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
base: './',
|
|
|
|
build: {
|
|
|
|
outDir: 'dist',
|
|
|
|
assetsDir: 'assets',
|
|
|
|
emptyOutDir: true,
|
|
|
|
},
|
|
|
|
server: {
|
|
|
|
port: 3001,
|
|
|
|
strictPort: false,
|
|
|
|
cors: true,
|
|
|
|
},
|
|
|
|
css: {
|
|
|
|
preprocessorOptions: {
|
|
|
|
scss: {
|
|
|
|
additionalData: `@use "@/styles/_variables.scss" as *;`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2025-04-26 13:15:30 +08:00
|
|
|
});
|