Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

difference between ts-loader? #94

Closed
PatrickJS opened this issue Jan 22, 2016 · 7 comments
Closed

difference between ts-loader? #94

PatrickJS opened this issue Jan 22, 2016 · 7 comments

Comments

@PatrickJS
Copy link

What's the difference between the two loaders?

@s-panferov
Copy link
Owner

This loader was created mostly to speed-up compilation in my own projects. Some of them are quite big and I wanted to have full control on how my files are compiled. There are three major points:

  1. awesome-typescript-loader (atl) uses dependency resolution to build modules dependency graph. This speeds up build process in some corner cases, but adds a lot of additional complexity. Also it can re-emit all related files which is also useful in some corner cases.

  2. atl has first-class integration with Babel and enables caching possibilities (for speed!)

  3. atl is able to fork type-checker to a separate process, which also speeds-up some development scenarios (e.g. react with react-hot-loader)

@kevin-abiera
Copy link

That should be in the README 😃

@TheLarkInn
Copy link
Contributor

Would you be willing to expand more on 'first-class integration with Babel'

@s-panferov
Copy link
Owner

@TheLarkInn when useBabel and useCache flags enabled, typescript's emit will be transplied with Babel and cached. So next time if source file (+environment) has the same checksum we can totally skip typescript's and babel's transpiling. This significantly reduces build time.

@admmasters
Copy link

I'm wondering whether this should be closed as imho its not really an issue. :-p

@s-panferov
Copy link
Owner

Moved to README. Thanks for all!

@caleb15
Copy link

caleb15 commented Jun 19, 2019

People referencing this issue should also take a look at #497

According to @bengrunfeld ts-loader is about 10-17 seconds faster than awesome-typescript-loader.

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

No branches or pull requests

6 participants