Skip to content

Commit

Permalink
Be a bit more sophisticated about whether we call workbox-build.getMa…
Browse files Browse the repository at this point in the history
…nifest().
  • Loading branch information
jeffposnick committed Dec 21, 2017
1 parent a782169 commit bd5091b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/workbox-webpack-plugin/src/inject-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,12 @@ class InjectManifest {
let entries = getManifestEntriesFromCompilation(compilation, this.config);

const sanitizedConfig = sanitizeConfig.forGetManifest(this.config);
try {
// If there are any "extra" config options remaining after we remove the
// ones that are used natively by the plugin, then assume that they should
// be passed on to workbox-build.getManifest() to generate extra entries.
if (Object.keys(sanitizedConfig).length > 0) {
const {manifestEntries} = await getManifest(sanitizedConfig);
entries = entries.concat(manifestEntries);
} catch (error) {
if (!error.isJoi) {
throw error;
}
}

const manifestString = stringifyManifest(entries);
Expand Down

0 comments on commit bd5091b

Please sign in to comment.