From de0537f3d9265b4a543be8956d4f89974f7d9e2b Mon Sep 17 00:00:00 2001 From: Adam Segal Date: Tue, 16 Oct 2018 10:25:12 -0700 Subject: [PATCH] Put hash right before the last file extension (#245) Fixes #244 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 0896fec..e6811d0 100644 --- a/index.js +++ b/index.js @@ -33,7 +33,7 @@ function transformFilename(file) { file.revHash = revHash(file.contents); file.path = modifyFilename(file.path, (filename, extension) => { - const extIndex = filename.indexOf('.'); + const extIndex = filename.lastIndexOf('.'); filename = extIndex === -1 ? revPath(filename, file.revHash) :