From d2f8f25b354b27a7fec9f2de5c83622a37cd2243 Mon Sep 17 00:00:00 2001 From: darrylsepeda Date: Thu, 15 Jun 2017 16:32:48 +0700 Subject: [PATCH] remove public path for index.html #79 --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 =>