Add a warning when passing the --experimental-static-build flag

This commit is contained in:
Matthew Phillips 2022-03-04 10:11:38 -05:00
parent 04d14f1ca3
commit f64d1b143d

View file

@ -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<Flags>): 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,