Skip to content

Commit 8fab550

Browse files
committed
Clear the start command when the framework or adapter changes
A start command names an entrypoint belonging to one framework. Carrying it across a switch submits it against a runtime that has no such entrypoint, and a switch to static leaves a command the form no longer shows. Reset it alongside the other framework-derived fields, and send it only for the ssr adapter, matching the fallbackFile line beside it.
1 parent 6e64d0c commit 8fab550

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/routes/(console)/project-[region]-[project]/sites/site-[site]/settings/updateBuildSettings.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
outputDirectory = data.outputDirectory;
9393
adapter = data.key as Adapter;
9494
fallback = data.fallbackFile;
95+
startCommand = '';
9596
} else if (hasFrameworkSelectionChanged) {
9697
const data =
9798
selectedFramework.adapters.find((a) => a.key === adapter) ??
@@ -110,6 +111,7 @@
110111
fallback = isOriginalAdapter
111112
? (site?.fallbackFile ?? data.fallbackFile)
112113
: data.fallbackFile;
114+
startCommand = isOriginalAdapter ? (site?.startCommand ?? '') : '';
113115
}
114116
115117
lastFrameworkAdapterKey = `${selectedFramework.key}:${adapter ?? ''}`;
@@ -167,7 +169,7 @@
167169
timeout: site.timeout || undefined,
168170
installCommand: installCommand || undefined,
169171
buildCommand: buildCommand || undefined,
170-
startCommand: startCommand || undefined,
172+
startCommand: adptr?.key === 'ssr' ? startCommand || undefined : undefined,
171173
outputDirectory: outputDirectory || undefined,
172174
buildRuntime: (site?.buildRuntime as BuildRuntime) || undefined,
173175
adapter: (adptr?.key as Adapter) || undefined,

0 commit comments

Comments
 (0)