Make recursiveReadDir return sorted array (#7658)

This function is used to return the /pages folder content.
The way it is today is that every run might result in a different order of files, which makes the whole webpack chunks be different.
An ordered list of files will result in a deterministic build, which will improve caching.
This commit is contained in:
Admon Sasson 2019-07-09 04:06:04 +03:00 committed by Joe Haddad
parent e56573008b
commit 634b138b40

View file

@ -42,5 +42,5 @@ export async function recursiveReadDir(
})
)
return arr
return arr.sort()
}