Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

feat: cacheKeys option #320

Merged
merged 1 commit into from Jul 2, 2018
Merged

feat: cacheKeys option #320

merged 1 commit into from Jul 2, 2018

Conversation

alexander-akait
Copy link
Member

No description provided.

@@ -44,6 +44,7 @@ module.exports = {
|**`include`**|`{RegExp\|Array<RegExp>}`|`undefined`|Files to `include`|
|**`exclude`**|`{RegExp\|Array<RegExp>}`|`undefined`|Files to `exclude`|
|**`cache`**|`{Boolean\|String}`|`false`|Enable file caching|
|**`cacheKeys`**|`{Function(defaultCacheKeys, file) -> {Object}}`|`defaultCacheKeys => defaultCacheKeys`|Allows you to override default cache keys|
Copy link
Contributor

Choose a reason for hiding this comment

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

What about the 3rd param?

Choose a reason for hiding this comment

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

seconded

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't understand 😄

Choose a reason for hiding this comment

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

@evilebottnawi sorry. that means "I agree, and have the same comment"

Copy link
Member Author

Choose a reason for hiding this comment

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

@shellscape i don't understand what i will do 😄 3rd param? What is mean?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Example below:

[
  new UglifyJsPlugin({
    cache: true,
    cacheKeys: (defaultCacheKeys, file, options) => {
      //                                ^^^^^^^
      defaultCacheKeys.myCacheKey = 'myCacheKeyValue';
      
      return defaultCacheKeys;
    },
  })
]

I now understand that my comment was wrong. The signature is correct, the example is not.

@@ -44,6 +44,7 @@ module.exports = {
|**`include`**|`{RegExp\|Array<RegExp>}`|`undefined`|Files to `include`|
|**`exclude`**|`{RegExp\|Array<RegExp>}`|`undefined`|Files to `exclude`|
|**`cache`**|`{Boolean\|String}`|`false`|Enable file caching|
|**`cacheKeys`**|`{Function(defaultCacheKeys, file) -> {Object}}`|`defaultCacheKeys => defaultCacheKeys`|Allows you to override default cache keys|
Copy link
Contributor

Choose a reason for hiding this comment

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

Example below:

[
  new UglifyJsPlugin({
    cache: true,
    cacheKeys: (defaultCacheKeys, file, options) => {
      //                                ^^^^^^^
      defaultCacheKeys.myCacheKey = 'myCacheKeyValue';
      
      return defaultCacheKeys;
    },
  })
]

I now understand that my comment was wrong. The signature is correct, the example is not.

README.md Outdated
[
new UglifyJsPlugin({
cache: true,
cacheKeys: (defaultCacheKeys, file, options) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the 3rd argument please

Copy link
Member Author

Choose a reason for hiding this comment

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

/cc @ooflorent done, need approve 😄

@alexander-akait alexander-akait merged commit 249eef3 into master Jul 2, 2018
@alexander-akait alexander-akait deleted the feat-custom-cache-keys branch July 2, 2018 15:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants