Skip to content

Commit

Permalink
remove config caching
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanatkn committed Sep 20, 2023
1 parent fee0bcf commit 693e4ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/gold-emus-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@feltjs/gro': patch
---

remove config caching
7 changes: 1 addition & 6 deletions src/lib/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ export interface GroConfigModule {
readonly default: GroConfig | GroConfigCreator;
}

let cached_config: Promise<GroConfig> | undefined;

export const load_config = (): Promise<GroConfig> =>
cached_config || (cached_config = _load_config());

const _load_config = async (): Promise<GroConfig> => {
export const load_config = async (): Promise<GroConfig> => {
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;
Expand Down

0 comments on commit 693e4ce

Please sign in to comment.