0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00

Add the output option (#4015)

* Start of work on astroConfig.mode === 'server'

* Add tests and more

* adapter -> deploy in some places

* Add fallback for `adapter` config

* Update more tests

* Update image tests

* Fix clientAddress test

* Updates based on PR review

* Add a changeset

* Update integrations tests + readme

* Oops

* Remove old option

* Rename `mode` to `output`

* Update Node adapter test

* Update test

* fred pass

* fred pass

* fred pass

* fix test

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
This commit is contained in:
Matthew Phillips 2022-07-25 00:18:02 -04:00 committed by GitHub
parent f4b926b1c8
commit a261f951ac
2 changed files with 3 additions and 4 deletions

View file

@ -25,7 +25,7 @@ First, install the `@astrojs/vercel` package using your package manager. If you'
npm install @astrojs/vercel
```
Then, install this adapter in your `astro.config.*` file using the `adapter` property (note the import from `@astrojs/vercel/serverless` - see [targets](#targets)).
Then, install this adapter in your `astro.config.*` file using the `deploy` property (note the import from `@astrojs/vercel/serverless` - see [targets](#targets)).
__`astro.config.mjs`__
@ -34,6 +34,7 @@ import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel/serverless';
export default defineConfig({
output: 'server',
adapter: vercel()
});
```

View file

@ -23,9 +23,7 @@ export default function vercelStatic(): AstroIntegration {
setAdapter(getAdapter());
_config = config;
},
'astro:build:start': async ({ buildConfig }) => {
buildConfig.staticMode = true;
'astro:build:start': async () => {
// Ensure to have `.vercel/output` empty.
// This is because, when building to static, outDir = .vercel/output/static/,
// so .vercel/output itself won't get cleaned.