alias '@' to path.resolve(__dirname, './src') is not working
Problem
Describe the bug Alias `{ '@': path.resolve(__dirname, './src') }` is not working. Reproduction project structure: [code block] vite.config.js: [code block] src/index.js [code block] Got error in vite: [code block] System Info - required `vite` version: 0.17.0 - required Operating System: Linux - required Node version: 14.3.0
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: alias '@' to path.resolve(__dirname, './src') is not working
I think we probably will eventually provide an easier way to alias src directories. If your resolver is not working, it's better to provide a full reproduction instead of a single config file.
Trust Score
6 verifications
- 1
I think we probably will eventually provide an easier way to alias src directori
I think we probably will eventually provide an easier way to alias src directories. If your resolver is not working, it's better to provide a full reproduction instead of a single config file.
Validation
Resolved in vitejs/vite GitHub issue #279. Community reactions: 16 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep