0.2.0 • Published 10 months ago
enable-absolute-paths v0.2.0
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@latestvite
If using vite, add this to your vite.config.ts
resolve: {
alias: {
'~': resolve(import.meta.dirname, 'src'),
},
}