diff --git a/ChangeLog.md b/ChangeLog.md
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,9 @@
 # ChangeLog for file-embed
 
+## 0.0.13.0
+
+* Ensure that directory listings are returned in sorted order for reproducibility [yesodweb/yesod#1684](https://github.com/yesodweb/yesod/issues/1684)
+
 ## 0.0.12.0
 
 * Use the `Bytes` literal on newer GHCs to reduce memory usage during compilation [#36](https://github.com/snoyberg/file-embed/pull/36)
diff --git a/Data/FileEmbed.hs b/Data/FileEmbed.hs
--- a/Data/FileEmbed.hs
+++ b/Data/FileEmbed.hs
@@ -71,6 +71,8 @@
 import System.FilePath ((</>), takeDirectory, takeExtension)
 import Data.String (fromString)
 import Prelude as P
+import Data.List (sortBy)
+import Data.Ord (comparing)
 
 -- | Embed a single file in your source code.
 --
@@ -234,7 +236,7 @@
              mapM (liftPair2 . second B.readFile)
     dirs <- filterM (doesDirectoryExist . snd) all' >>=
             mapM (fileList' realTop . fst)
-    return $ concat $ files : dirs
+    return $ sortBy (comparing fst) $ concat $ files : dirs
 
 liftPair2 :: Monad m => (a, m b) -> m (a, b)
 liftPair2 (a, b) = b >>= \b' -> return (a, b')
diff --git a/file-embed.cabal b/file-embed.cabal
--- a/file-embed.cabal
+++ b/file-embed.cabal
@@ -1,5 +1,5 @@
 name:            file-embed
-version:         0.0.12.0
+version:         0.0.13.0
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
diff --git a/test/main.hs b/test/main.hs
--- a/test/main.hs
+++ b/test/main.hs
@@ -14,8 +14,8 @@
 main = do
     let received = $(embedDir "test/sample")
     received @?=
-        [ ("foo", "foo\r\n")
-        , ("bar" </> "baz", "baz\r\n")
+        [ ("bar" </> "baz", "baz\r\n")
+        , ("foo", "foo\r\n")
         ]
     let str = $(embedStringFile "test/sample/foo") :: String
     filter (/= '\r') str @?= "foo\n"
