0.1.2 • Published 2 months ago
enable-absolute-paths v0.1.2
enable-absolute-paths
Enable absolute paths in a TypeScript project
Import files with ~/
. Assumes a ./src
folder.
src/example.ts
-> ~/example
Usage
npx enable-absolute-paths@latest
vite
If using vite
, add this to your vite.config.ts
resolve: {
alias: {
'~': resolve(__dirname, 'src'),
},
},