-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin doesn't follow the same module-loader search paths #30
Comments
The fix should be to adjust |
This could be tricky, as those are not the only extensions a module could have, eg it could be |
Yup and you could have something like this as well: declare module 'css!*' {
var e: string;
export default e;
}
...
import myCss from 'css!foo/myCss'; One option is to ignore the additional loaders like For the other extensions you could make it configurable to add/replace/remove |
Hi @richardspence, I reread the tsconfig docs and yes, the only extensions allowed are I released a fix, please upgrade to v1.1.10. |
Summary
The plugin treats the paths in the tsconfig as gospel for adjusting the resolution path. It should instead use it as the primary search folder for determining where the module is located before falling back to the default module resolution strategies.
Repro steps
tsconfig:
foo/IFoo
foo/File2
Expected
The plugin to not transform the relative imports (since they aren't available of the root). Paths should be performed first and only applied if the module can be loaded from that location. Then it should fallback to the module resolution strategy defined for the project https://www.typescriptlang.org/docs/handbook/module-resolution.html#module-resolution-strategies
Actual
foo/File2.d.ts
The text was updated successfully, but these errors were encountered: