Closed V-ed closed 3 years ago
If you fork this repo and update the ./demo
directory to use Svelte, I will debug it. 👍
There you go! https://github.com/V-ed/vite-tsconfig-paths
(I used npm, just fyi since I believe you are using yarn)
Simply comment out the lines : https://github.com/V-ed/vite-tsconfig-paths/blob/e1770b7aaf140533a274845ce36e7661f57510a0/demo/vite.config.ts#L7-L12 (the resolve.alias
object) to verify if tsconfigPath()
works or not.
Supported in v2.4.0
Awesome, thanks @naranjamecanica and @aleclarson !
Well, it works in my reproduction repo but not in my current app haha, I'll debug some more, might be due to other plugins, I'll keep this thread updated with what I find!
Make sure you have checkJs: true
in your tsconfig
Make sure you have
checkJs: true
in your tsconfig
That was exactly it. I even checked the PR's code and saw the checkJs config option conditional, yet still didn't think about it.
This should probably be mentioned in the README, especially for those using typescript in files other than tsx?
- checkJs is not often setup in my repos haha.
Thanks for the quick tip have have a nice day!
This plugin doesn't seem to work with Svelte files.
I can see in this issue that the goal would be to only apply this script to .vue modules :
With Vite 2 becoming framework agnostic, I was wondering if this stance will still be kept? Or am I missing something in my config? I'd like to use this for automatic path mapping, it's really useful!
Thanks in advance!