diff --git a/lib/webpacker/compiler.rb b/lib/webpacker/compiler.rb
index <HASH>..<HASH> 100644
--- a/lib/webpacker/compiler.rb
+++ b/lib/webpacker/compiler.rb
@@ -87,7 +87,7 @@ class Webpacker::Compiler
     end
 
     def compilation_digest_path
-      config.cache_path.join(".last-compilation-digest-#{Webpacker.env}")
+      config.cache_path.join("last-compilation-digest-#{Webpacker.env}")
     end
 
     def webpack_env
diff --git a/test/compiler_test.rb b/test/compiler_test.rb
index <HASH>..<HASH> 100644
--- a/test/compiler_test.rb
+++ b/test/compiler_test.rb
@@ -59,6 +59,6 @@ class CompilerTest < Minitest::Test
   end
 
   def test_compilation_digest_path
-    assert Webpacker.compiler.send(:compilation_digest_path).to_s.ends_with?(Webpacker.env)
+    assert_equal Webpacker.compiler.send(:compilation_digest_path).basename.to_s, "last-compilation-digest-#{Webpacker.env}"
   end
 end
Make compilation digest file visible (#<I>)