You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.
The default value for cacheIdentifier is cache-loader:{version} {process.env.NODE_ENV}. My project has multiple webpack config files where the step that uses cache-loader gets the same input from previous loaders but performs different transformations (eg. Istanbul instrumentation for test builds only).
I like that the default string includes the cache-loader version number, since it makes sense to invalidate the cache when this loader is updated. When setting a custom value, it is difficult to replicate this behavior since retrieving the cache-loader version number is tricky. It seems like the best options are hard-coding the version number into the string and hoping to remember to update it when upgrading to a new version of cache-loader, or some hacky manipulation of the path returned by require.resolve("cache-loader").
Couple of possible fixes:
Append the user-provided cacheIdentifier to the default string instead of replacing the default string
Export the cache-loader version number
Happy to submit a PR with whatever fix is deemed best!
The text was updated successfully, but these errors were encountered:
The default value for
cacheIdentifier
iscache-loader:{version} {process.env.NODE_ENV}
. My project has multiple webpack config files where the step that uses cache-loader gets the same input from previous loaders but performs different transformations (eg. Istanbul instrumentation for test builds only).I like that the default string includes the cache-loader version number, since it makes sense to invalidate the cache when this loader is updated. When setting a custom value, it is difficult to replicate this behavior since retrieving the cache-loader version number is tricky. It seems like the best options are hard-coding the version number into the string and hoping to remember to update it when upgrading to a new version of cache-loader, or some hacky manipulation of the path returned by
require.resolve("cache-loader")
.Couple of possible fixes:
cacheIdentifier
to the default string instead of replacing the default stringHappy to submit a PR with whatever fix is deemed best!
The text was updated successfully, but these errors were encountered: