Skip to content

Commit

Permalink
dedup compatibility_flags
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 20, 2024
1 parent 3352883 commit 71fd0c5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/presets/cloudflare/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,5 +287,12 @@ function mergeWranglerConfig(
extraConfig: WranglerConfig = {}
): WranglerConfig {
// TODO: Improve logic with explicit merging
return defu(userConfig, extraConfig);
const mergedConfig: WranglerConfig = defu(userConfig, extraConfig);
if (mergedConfig.compatibility_flags) {
// TODO: exclude `no_` configs from userConfig
mergedConfig.compatibility_flags = [
...new Set(mergedConfig.compatibility_flags),
];
}
return mergedConfig;
}

0 comments on commit 71fd0c5

Please sign in to comment.