vite 配置
- 配置别名
- vite-config.js ```javascript // vite.config.js import vue from ‘@vitejs/plugin-vue’ import path from ‘path’
/**
- @type {import(‘vite’).UserConfig} */ export default { plugins: [vue()], alias: { ‘@’: path.resolve(__dirname, ‘/src’) } } ```
- tsconfig.json
"paths": {
"@/*": ["src/*"]
},