-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[dev] Fix missing types from node_modules with at-loader on Windows #2367
Conversation
Fix missing types with at-loader on WindowsPreview: documentation | landing | table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok cool this is nice. is there an issue on at-loader
that we can reference?
@giladgray not that I know of. I only found this one #2356 (comment) from angular-starter, where I got the fix from. |
@reiv i think you pasted the wrong link above? |
@reiv thanks for the link. before merging this, would you mind trying one thing? upgrade |
@giladgray I just gave that a try.
It didn't fix the issue and now a lot more type definitions can't be found, including
It's really quite befuddling. |
@reiv yuck. alright let's merge this! |
Changes proposed in this pull request:
This PR fixes a bug that affects
at-loader
on Windows: typings fromnode_modules
aren't loaded automatically as they are in other environments, resulting in many errors during compilation, primarily when running unit tests. For example, runningyarn test
in thecore
package produces 836 errors, because the namespace for Mocha isn't loaded:(Note that
tsc
still emits correct code, but the type-checking process fails).The fix is to explicitly instruct
tsc
to look innode_modules/@types
for type declarations, which is something it should already be doing by default.