mirror of
https://github.com/talktao/Vue3-Vite-Vant-TS-H5.git
synced 2025-04-06 03:57:55 +08:00
24 lines
509 B
TypeScript
24 lines
509 B
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import path from "path"
|
|
import styleImport, { VantResolve } from 'vite-plugin-style-import';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias:{
|
|
// 配置src目录
|
|
"@": path.resolve(__dirname,"src"),
|
|
// 导入其他目录
|
|
"components": path.resolve(__dirname, "components")
|
|
}
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
styleImport({
|
|
resolves: [VantResolve()],
|
|
}),
|
|
]
|
|
|
|
})
|