webpack-contrib/cache-loader

Control `cacheDirectory` with env variable

tomasz-sodzawiczny opened this issue · 3 comments

Feature Proposal

Add an option to control the cacheDirectory with an env variable (e.g. CACHE_LOADER_CACHE_DIR).

Feature Use Case

Useful for keeping the default for local dev environment and controlling the value on CI/CD.

The cacheDirectoryoption should still take precedence if specified.

Implementation proposal in #92

Why not just do the following in your webpack config?

cacheDirectory = process.env.CACHE_LOADER_CACHE_DIR

Implemented in find-cache-dir