Skip to content

Commit

Permalink
remove webpack public path for index.html goldhand#79
Browse files Browse the repository at this point in the history
  • Loading branch information
darrylsepeda committed Jun 15, 2017
1 parent eb05275 commit 9271641
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ class SWPrecacheWebpackPlugin {
// get all assets outputted by webpack
const assetGlobs = Object
.keys(compilation.assets)
.map(f => path.join(outputPath, f));
.map(f => {
return (f === 'index.html') ? path.join('/', f) : path.join(outputPath, f);
});

// merge assetGlobs with provided staticFileGlobs and filter using staticFileGlobsIgnorePatterns
const staticFileGlobs = assetGlobs.concat(this.options.staticFileGlobs || []).filter(text =>
Expand Down

0 comments on commit 9271641

Please sign in to comment.