Skip to content

Commit

Permalink
Add a warning when passing the --experimental-static-build flag (#2718)
Browse files Browse the repository at this point in the history
* Add a warning when passing the --experimental-static-build flag

* Disable the lint warning
  • Loading branch information
matthewp authored and Nate Moore committed Mar 9, 2022
1 parent 28f5418 commit 0ef6b93
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/astro/src/core/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Flags>): 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,
Expand Down

0 comments on commit 0ef6b93

Please sign in to comment.