antonk52 / cssmodules-language-server

autocompletion and go-to-defintion for cssmodules
MIT License
54 stars 8 forks source link

Not working with tsconfig aliases #5

Closed igor-ribeiro closed 2 years ago

igor-ribeiro commented 2 years ago

Hello! Thanks for the package.

It's not working when I use an alias:

{
   "baseUrl": "./",
    "paths": {
      "~/*": ["./*"]
    }
}

https://user-images.githubusercontent.com/5148753/148647452-998f2497-7cc8-4c39-a124-c4b5d8b1fa5a.mp4

.

antonk52 commented 2 years ago

Hello and thank you for the issue! Sorry for a late response.

The current implementation does not resolve aliases as there is a lot of extra work to handle. It would be nice to handle aliases. Typescript aliases, webpack aliases, esbuild, parcel, babel-plugin-module-resolver. The resolution may not work if a config for any of the above uses external dependencies that are not installed(no one run npm install). This is something that might need a little triage. I am open to ideas, please do share if you have any.

If I have time I will attempt to work on this on a weekend 🙂