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
Collaborator

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 Apr 3, 2019

@docusaurus-bot

This comment has been minimized.

Copy link
Collaborator

commented Apr 3, 2019

Deploy preview for docusaurus-2 ready!

Built with commit a658d67

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

@docusaurus-bot

This comment has been minimized.

Copy link
Collaborator

commented Apr 3, 2019

Deploy preview for docusaurus-preview ready!

Built with commit a658d67

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

packages/docusaurus/bin/docusaurus.js Show resolved Hide resolved

@yangshun yangshun merged commit 94a4ef5 into facebook:master Apr 3, 2019

3 checks passed

ci/circleci: lint-prettier Your tests passed on CircleCI!
Details
ci/circleci: tests Your tests passed on CircleCI!
Details
deploy/netlify Deploy preview ready!
Details

@endiliey endiliey deleted the endiliey:cache branch Apr 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.