-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
@types declarations mess up incremental builds on Windows #372
Comments
Cool - we'd love it if you could send us a PR and we'll take a look! |
Ok I can probably send a PR tomorrow. |
Sweet - I look forward to it! |
smphhh
added a commit
to smphhh/ts-loader
that referenced
this issue
Nov 14, 2016
smphhh
added a commit
to smphhh/ts-loader
that referenced
this issue
Nov 14, 2016
smphhh
added a commit
to smphhh/ts-loader
that referenced
this issue
Nov 14, 2016
smphhh
added a commit
to smphhh/ts-loader
that referenced
this issue
Nov 14, 2016
smphhh
added a commit
to smphhh/ts-loader
that referenced
this issue
Nov 14, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I was investigating an issue where ts-loader was apparently always rebuilding all the source files in a bundle in watch mode regardless of how small or isolated the changes were. After digging around, I think I found the culprit: the module resolution paths returned by typescript module resolution in the resolveModuleNames LS host function are not normalized. In particular, declaration files in node_modules/@types directory are added once as dependencies to all files, and a second version of the same dependency is added using the unnormalized (unix-style) path for files that actually refer to the module with an import statement. The module with the unnormalized path seems never get actually build, which causes all modules depending on it to always be rebuild when any file changes.
That's the theory I came up with anyway, but I think the fix involves just normalizing the paths returned by the TS module resolution. At least that seemed to fix the issue in my quick test.
The text was updated successfully, but these errors were encountered: