From f64d1b143d2e0f0bfdddcdc74508540f3f98db25 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 4 Mar 2022 10:11:38 -0500 Subject: [PATCH] Add a warning when passing the --experimental-static-build flag --- packages/astro/src/core/config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/astro/src/core/config.ts b/packages/astro/src/core/config.ts index 05728527f..26e42789a 100644 --- a/packages/astro/src/core/config.ts +++ b/packages/astro/src/core/config.ts @@ -115,6 +115,10 @@ function addTrailingSlash(str: string): string { /** Convert the generic "yargs" flag object into our own, custom TypeScript object. */ function resolveFlags(flags: Partial): CLIFlags { + if(flags.experimentalStaticBuild) { + console.warn(`Passing --experimental-static-build is no longer necessary and is now the default. The flag will be removed in a future version of Astro.`) + } + return { projectRoot: typeof flags.projectRoot === 'string' ? flags.projectRoot : undefined, site: typeof flags.site === 'string' ? flags.site : undefined,