Skip to content

Commit 8034e17

Browse files
committed
chore(na): change default cache directory
1 parent 4fb8478 commit 8034e17

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = {
5050
| :-------------------: | :----------------------------------------------: | :---------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
5151
| **`cacheContext`** | `{String}` | `undefined` | Allows you to override the default cache context in order to generate the cache relatively to a path. By default it will use absolute paths |
5252
| **`cacheKey`** | `{Function(options, request) -> {String}}` | `undefined` | Allows you to override default cache key generator |
53-
| **`cacheDirectory`** | `{String}` | `path.resolve('.cache-loader')` | Provide a cache directory where cache items should be stored (used for default read/write implementation) |
53+
| **`cacheDirectory`** | `{String}` | `path.resolve('./node_modules/.cache/.cache-loader')` | Provide a cache directory where cache items should be stored (used for default read/write implementation) |
5454
| **`cacheIdentifier`** | `{String}` | `cache-loader:{version} {process.env.NODE_ENV}` | Provide an invalidation identifier which is used to generate the hashes. You can use it for extra dependencies of loaders (used for default read/write implementation) |
5555
| **`write`** | `{Function(cacheKey, data, callback) -> {void}}` | `undefined` | Allows you to override default write cache data to file (e.g. Redis, memcached) |
5656
| **`read`** | `{Function(cacheKey, callback) -> {void}}` | `undefined` | Allows you to override default read cache data from file |

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const schema = require('./options.json');
1919

2020
const defaults = {
2121
cacheContext: '',
22-
cacheDirectory: path.resolve('.cache-loader'),
22+
cacheDirectory: path.resolve('./node_modules/.cache/.cache-loader'),
2323
cacheIdentifier: `cache-loader:${pkg.version} ${env}`,
2424
cacheKey,
2525
read,

0 commit comments

Comments
 (0)