Skip to content

Commit

Permalink
pass force option to del (#38)
Browse files Browse the repository at this point in the history
* pass force option to del

* forceDelete by default
  • Loading branch information
theTechie authored and goldhand committed Jan 8, 2017
1 parent f0d391a commit 8c407cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Expand Up @@ -14,6 +14,7 @@ const
const DEFAULT_OPTIONS = {
cacheId: DEFAULT_CACHE_ID,
filename: DEFAULT_WORKER_FILENAME,
forceDelete: true
};

/**
Expand Down Expand Up @@ -116,7 +117,7 @@ class SWPrecacheWebpackPlugin {
...this.overrides,
};

return del(filepath).then(() => {
return del(filepath, { ...this.options.forceDelete }).then(() => {
return swPrecache.write(filepath, workerOptions);
});
}
Expand Down

0 comments on commit 8c407cb

Please sign in to comment.