Skip to content

Commit a3db580

Browse files
authored
feat: deprecate cache in flavour of seed (#84)
BREAKING CHANGE: 'cache' was renamed 'seed'
1 parent 7fcc482 commit a3db580

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

lib/plugin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ function ManifestPlugin(opts) {
88
fileName: 'manifest.json',
99
transformExtensions: /^(gz|map)$/i,
1010
writeToFileEmit: false,
11-
cache: null, // TODO: Remove `cache` in next major release in favour of `seed`.
1211
seed: null,
1312
filter: null,
1413
map: null,
@@ -28,7 +27,7 @@ ManifestPlugin.prototype.getFileType = function(str) {
2827

2928
ManifestPlugin.prototype.apply = function(compiler) {
3029
var outputName = this.opts.fileName;
31-
var seed = this.opts.seed || this.opts.cache || {};
30+
var seed = this.opts.seed || {};
3231
var moduleAssets = {};
3332

3433
compiler.plugin("compilation", function (compilation) {

spec/plugin.spec.js

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -311,32 +311,6 @@ describe('ManifestPlugin', function() {
311311
});
312312
});
313313

314-
it('still accepts cache parameter (deprecated)', function(done) {
315-
var cache = {};
316-
webpackCompile([{
317-
context: __dirname,
318-
entry: {
319-
one: './fixtures/file.js'
320-
}
321-
}, {
322-
context: __dirname,
323-
entry: {
324-
two: './fixtures/file-two.js'
325-
}
326-
}], {
327-
manifestOptions: {
328-
cache: cache
329-
}
330-
}, function(manifest) {
331-
expect(manifest).toEqual({
332-
'one.js': 'one.js',
333-
'two.js': 'two.js'
334-
});
335-
336-
done();
337-
});
338-
});
339-
340314
it('outputs a manifest of no-js file', function(done) {
341315
webpackCompile({
342316
context: __dirname,

0 commit comments

Comments
 (0)