Skip to content
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

Disable ts-loader typechecking for non-build files (resolves #208) #210

Closed
wants to merge 1 commit into from

Conversation

guybedford
Copy link
Contributor

Up until now the ts loader has been running in the mode where it runs all typechecking (like what you get in the VScode console for all the types in the project). Because this feature doesn't naturally support webpack caching, disabling it is the easiest fix for #208.

I tend to think a more permissive build makes sense as well and I believe is in line with what Deno offers too.

The main concern with an alternative fix like @sokra describes is that it would mean always loading the ts loader upfront (therefore slowing down startup) unless we can get a hook into the cache usage to know if a ".ts" file is being loaded or not in order to conditionally do this (perhaps Tobias will know if this is possible).

But it seems easier and a better experience I think to just go for the one-liner :)

@codecov-io
Copy link

Codecov Report

Merging #210 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #210   +/-   ##
=======================================
  Coverage   67.87%   67.87%           
=======================================
  Files          12       12           
  Lines         579      579           
=======================================
  Hits          393      393           
  Misses        186      186
Impacted Files Coverage Δ
src/index.js 70.96% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c813b07...7b65b5a. Read the comment docs.

@guybedford
Copy link
Contributor Author

@sokra if we wanted to know if there is a ".ts" file loaded in the build to know to load the ts loader afterCompile hook for type checking (without incurring that cost for every load), is there a reliable hook that could get this information in time?

@rauchg
Copy link
Member

rauchg commented Jan 9, 2019

Favored #213 over this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants