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

feature: use disk file cache #3275

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/watch/index.ts
Expand Up @@ -139,6 +139,10 @@ export class Task {
});
this.inputOptions = inputOptions;

if (config && config.cache) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible the config is not an object? Otherwise the check can be shortened.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, it my habitual behavior.

this.cache = config.cache as RollupCache;
}

this.outputs = outputOptions;
this.outputFiles = this.outputs.map(output => {
if (output.file || output.dir) return path.resolve(output.file || (output.dir as string));
Expand Down