Appearance
npm create vite@latest yarn create vite pnpm create vite
vite.config.ts
import path from 'path' resolve: { alias: { '@': path.resolve(__dirname, 'src') }, },
tsconfig.json
{ "compilerOptions": { "baseUrl": "./", "paths": { "@/*": ["src/*"] } } }
Vite 官网