From 23efd9e98ae822880a54d3ceac689ccec491ce21 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 4 Mar 2022 17:17:34 -0500 Subject: [PATCH] Add a warning when passing the --experimental-static-build flag (#2718) * Add a warning when passing the --experimental-static-build flag * Disable the lint warning --- packages/astro/src/core/config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/astro/src/core/config.ts b/packages/astro/src/core/config.ts index d9d73f36c26d8..4efbb4c7b3e74 100644 --- a/packages/astro/src/core/config.ts +++ b/packages/astro/src/core/config.ts @@ -113,6 +113,11 @@ 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) { + // eslint-disable-next-line no-console + 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,