Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

Question: cacheDirectory in babel-loader + cache-loader... does it makes sense (=> Doc) #10

Closed
swernerx opened this issue Jun 22, 2017 · 4 comments

Comments

@swernerx
Copy link

It would be great help if someone could figure out whether it's reasonable to combine the cache-loader with the cache feature of Babel. Whether to combine both or prefer one of them etc. I think that's also a pretty fundamental question the readme should answer - Thanks!

@alexander-akait
Copy link
Member

@swernerx it is just example, your can use cache-loader with your css-loader (style-loader -> cache-loader -> css-loader -> postcss-loader -> etc)

@briandipalma
Copy link

Just test it by adding and removing cache-loader, I'm not seeing any real difference in performance so my guess is that the babel cache performs as well as using cache-loader.

@michael-ciniawsky
Copy link
Member

They both serve the same purpose and are interchangeable, with cache-loader being the 'newer and official' way to cache a loader in general

@jeron-diovis
Copy link

jeron-diovis commented Mar 21, 2018

In my experience, with cache-loader rebuild time increased dramatically – from 2.5s to 9.5s. While initial build time decreased for ~40s.
Caching from babel-loader speeds up initial build a bit less, but does not affect rebuild time.
So I use cache-loader for caching styles only, and babel-loader caching for js.

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

5 participants