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
@@ -18,9 +18,8 @@ class Webpacker::Compiler
 
   def compile
     if stale?
-      record_compilation_digest
       run_webpack.tap do |success|
-        remove_compilation_digest if !success
+        record_compilation_digest if success
       end
     else
       true
@@ -54,11 +53,6 @@ class Webpacker::Compiler
       compilation_digest_path.write(watched_files_digest)
     end
 
-    def remove_compilation_digest
-      compilation_digest_path.delete if compilation_digest_path.exist?
-    rescue Errno::ENOENT, Errno::ENOTDIR
-    end
-
     def run_webpack
       logger.info "Compiling…"
Only record compilation digest if webpack runs successfully. (#<I>)

This fixes an issue where current request gets an stale pack,

because previous request wrote the compilation digest before

webpack ends up running.