diff --git a/src/index.js b/src/index.js index 0a597a0..531ef36 100644 --- a/src/index.js +++ b/src/index.js @@ -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') ? f : path.join(outputPath, f); + }); // merge assetGlobs with provided staticFileGlobs and filter using staticFileGlobsIgnorePatterns const staticFileGlobs = assetGlobs.concat(this.options.staticFileGlobs || []).filter(text =>