From 8bc77072cbe8946eb4aa922719cdf51c4e275a97 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sun, 31 Dec 2023 18:44:53 +0000 Subject: [PATCH] fix: sort multiple config files `globSync` doesn't guarantee the order in which it returns the matching paths, so without the `sort()`, the config files may be merged differently each time the server is started --- packages/backend/src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts index dfaf186e03..a550fdc364 100644 --- a/packages/backend/src/config.ts +++ b/packages/backend/src/config.ts @@ -201,7 +201,7 @@ export function loadConfig(): Config { JSON.parse(fs.readFileSync(`${_dirname}/../../../built/_vite_/manifest.json`, 'utf-8')) : { 'src/_boot_.ts': { file: 'src/_boot_.ts' } }; - const config = globSync(path) + const config = globSync(path).sort() .map(path => fs.readFileSync(path, 'utf-8')) .map(contents => yaml.load(contents) as Source) .reduce(