We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
JSON.stringify()
cache
options.cache
1 parent bed4d76 commit 0d22741Copy full SHA for 0d22741
1 file changed
src/index.js
@@ -101,12 +101,12 @@ class CompressionPlugin {
101
return cacache
102
.get(cacheDir, cacheKey)
103
.then(
104
- result => JSON.parse(result.data),
+ result => result.data,
105
() => Promise
106
.resolve()
107
.then(() => this.compress(content))
108
109
- data => cacache.put(cacheDir, cacheKey, JSON.stringify(data))
+ data => cacache.put(cacheDir, cacheKey, data.toString())
110
.then(() => data),
111
),
112
);
0 commit comments