Subwaytime / vite-aliases

Alias auto generation for Vite
https://www.npmjs.com/package/vite-aliases
MIT License
210 stars 12 forks source link

refactor: implement js/tsconfig indentation interpretation logic #56

Closed AmrAbdulrahman closed 1 year ago

AmrAbdulrahman commented 1 year ago

In this MR I aim to interpret/guess the indentation from jsconfig/tsconfig before rewriting the paths config back to the file. This way, the plugin doesn't screw or force 4 spaces indentation for everyone.

I also made sure not to throw exception and fallback on the existing behaviour of '4 spaces' if we failed to interpret the indentation.

Screenshot 2023-02-17 at 17 36 46 Screenshot 2023-02-17 at 17 36 20 Screenshot 2023-02-17 at 17 35 46

Subwaytime commented 1 year ago

Thanks for the contribution! 🥳 @AmrAbdulrahman

AmrAbdulrahman commented 1 year ago

@Subwaytime Amazing! 🎉 Are you releasing this soon?