Remove unused code
This commit is contained in:
parent
d11451a22a
commit
b44670d0bd
plugins
|
@ -54,8 +54,8 @@ function entryManifest() {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Rollup plugin that provides the entry manifest to another bundle
|
* A Rollup plugin that provides the current entry manifest via a
|
||||||
* via a virtual module id.
|
* virtual module id.
|
||||||
*/
|
*/
|
||||||
inject(options = {}) {
|
inject(options = {}) {
|
||||||
const virtualId = options.virtualId || 'entry-manifest';
|
const virtualId = options.virtualId || 'entry-manifest';
|
||||||
|
@ -81,31 +81,6 @@ function entryManifest() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A Rollup plugin that writes the entry manifest to the filesystem.
|
|
||||||
*/
|
|
||||||
write(options = {}) {
|
|
||||||
const outputFile = options.outputFile || 'entry-manifest.json';
|
|
||||||
|
|
||||||
return {
|
|
||||||
name: 'entry-manifest-write',
|
|
||||||
buildStart() {
|
|
||||||
this.addWatchFile(watchfile);
|
|
||||||
},
|
|
||||||
generateBundle(options, bundle, isWrite) {
|
|
||||||
if (manifest == null) {
|
|
||||||
throw new Error(
|
|
||||||
'Manifest has not been recorded; use manifest.record() in your client bundle'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isWrite) {
|
|
||||||
writeFile(outputFile, JSON.stringify(manifest, null, 2) + '\n');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue