-
Notifications
You must be signed in to change notification settings - Fork 12.8k
How does TS support webpack's extensions? #19796
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
Comments
paths mapping do not affect relative paths. only non-relative ones. please see https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping. The compiler does not rewrite module names at emit time. module names are considered resource identifiers and are not modified.. see #18971, #18951 and #16640 |
@mhegazy So is there any workaround to support webpack extensions for now? |
In a global file, you can write something like declare module "*.vue" {
import Vue from "vue";
export default Vue;
} |
@DanielRosenwasser I've done that, my problem is that I want to remove |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
TypeScript Version: 2.6.1
Code
And I've set
paths
in my tsconfig.json.Expected behavior:
Actual behavior:
I must write
Otherwise typescript service of IntelliJ IDEA will report an error:
Error:(5, 17) TS2307:Cannot find module './views/Home'.
.The text was updated successfully, but these errors were encountered: