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

feat(v2): add cache-loader by default especially on babel-loader #1335

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

endiliey
Copy link
Contributor

@endiliey endiliey commented Apr 3, 2019

Motivation

Add https://github.com/webpack-contrib/cache-loader/ by default especially on expensive loader like babel-loader.

Also add --no-cache-loader cli option if user don't want it.

How it works:
Caches the result of following loaders on disk

cache-loader-3

See test plan for benefits

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

Yarn start

With cache-loader. Subsequent build is faster due to reuse of cache

cache-loader-2

Without cache loader, roughly similar performance
no-cache-loader

Yarn build

With cache-loader
yarn build cache-loader

Without cache-loader
yarn build no cache-loader

Notes:

Lot of possibility for improvement in the future. Just adding it for now

@endiliey endiliey requested a review from yangshun as a code owner April 3, 2019 18:44
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Apr 3, 2019
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-2 ready!

Built with commit a658d67

https://deploy-preview-1335--docusaurus-2.netlify.com

@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-preview ready!

Built with commit a658d67

https://deploy-preview-1335--docusaurus-preview.netlify.com

@yangshun yangshun merged commit 94a4ef5 into facebook:master Apr 3, 2019
@endiliey endiliey deleted the cache branch April 4, 2019 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants