Created
December 20, 2022 17:50
-
-
Save irvingvjuarez/d9832f0e02d89ae0bd3b05eb6070b33d to your computer and use it in GitHub Desktop.
How to add path aliases in a vite + ts project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
... | |
"paths": { | |
"@app/*": ["./src/*"] | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// imports... | |
import * as path from "path" | |
export default defineConfig({ | |
resolve: { | |
alias: { | |
"@app": path.resolve(__dirname, "./src") | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment