Files
vs100/vite.config.js
2025-12-12 17:49:20 +08:00

13 lines
363 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path' // 新增引入path模块
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: { // 新增:配置路径别名
alias: {
'@': path.resolve(__dirname, 'src') // 让@代表项目根目录下的src文件夹
}
}
})