From 693e4cebe095800544533883f4ec723a749210d4 Mon Sep 17 00:00:00 2001 From: Ryan Atkinson Date: Tue, 19 Sep 2023 21:50:24 -0600 Subject: [PATCH] remove config caching --- .changeset/gold-emus-cheat.md | 5 +++++ src/lib/config/config.ts | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 .changeset/gold-emus-cheat.md diff --git a/.changeset/gold-emus-cheat.md b/.changeset/gold-emus-cheat.md new file mode 100644 index 0000000000..f8b910f741 --- /dev/null +++ b/.changeset/gold-emus-cheat.md @@ -0,0 +1,5 @@ +--- +'@feltjs/gro': patch +--- + +remove config caching diff --git a/src/lib/config/config.ts b/src/lib/config/config.ts index 6d1880ee41..004b4604a4 100644 --- a/src/lib/config/config.ts +++ b/src/lib/config/config.ts @@ -29,12 +29,7 @@ export interface GroConfigModule { readonly default: GroConfig | GroConfigCreator; } -let cached_config: Promise | undefined; - -export const load_config = (): Promise => - cached_config || (cached_config = _load_config()); - -const _load_config = async (): Promise => { +export const load_config = async (): Promise => { const default_config = await create_default_config({} as any); // hacky so the default config demonstrates the same code a user would write const config_path = paths.config;