Skip to content

Commit

Permalink
chore(cf-pages): only create wrangler.toml if config is not empty (ni…
Browse files Browse the repository at this point in the history
…trojs#2356)

Co-authored-by: Pooya Parsa <pooya@pi0.io>
  • Loading branch information
atinux and pi0 authored Apr 11, 2024
1 parent 8e88dd4 commit bb03183
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/presets/cloudflare-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ async function writeCFWrangler(nitro: Nitro) {
const inlineConfig: WranglerConfig =
nitro.options.cloudflare?.wrangler || ({} as WranglerConfig);

// Write wrangler.toml only if config is not empty
if (Object.keys(inlineConfig).length === 0) {
return;
}

let configFromFile: WranglerConfig = {} as WranglerConfig;
const configPath = resolve(
nitro.options.rootDir,
Expand Down

0 comments on commit bb03183

Please sign in to comment.