The plugin should follow up the Vite's `resolve.alias` declarations
Describe the bug
I have my mapped aliases pointing to my local libraries and they're not being resolved, I know I can map them using the tsconfig inside of compilerOptions.paths, but it's really annoying.
Reproduction
Define a new alias in vite.config.js, and try to import it globally.
Expected behavior
Import the modules using its respective aliases defined inside of vite.config.js.
System Info
N/A
Additional context
N/A
Validations
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
If you're saying that tsc checker requires a compilerOptions.paths, that's by design. This plugin aims to provide an original tsc diagnostic.
If you're saying that tsc checker requires a
compilerOptions.paths, that's by design. This plugin aims to provide an original tsc diagnostic.
I know right, but shouldn't it rely on the Vite's config?, AFAIK, that's what a plugin does, otherwise I'd just run my tsc manually without even installing a plugin. in the other hand, I don't see how resolve.alias should differ against compilerOptions.paths when resolving imports.
otherwise I'd just run my tsc manually without even installing a plugin
Yes, you can. This plugin provides a way to consume errors on the web page. You can treat it as the https://www.npmjs.com/package/fork-ts-checker-webpack-plugin for Vite.
in the other hand, I don't see how resolve.alias should differ against compilerOptions.paths when resolving imports.
The resolve.alias will guide Vite to how the modules should be resolved with alias. While compilerOptions.paths is for TypeScript to do type check with alias. The plugin should keep behaviors with tsc.
well, another bug I just found, is it doesn't resolve the sass named exports,

while Vite will build successfully. I see isn't a completely Vite integrated plugin as you told me before, but I wish it was.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is a bug report, please provide a minimal re-production repository or use path to reproduce. Thank you for your contributions.
@SashaPetrovska Should declare types for .scss modules for TypeScript. I believe this error would happen with a vanilla tsc --noEmit. Closed for upstream usage. Feel free to re-open if you find it's a plugin-specified bug.