mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
Unflag hybrid output (#7260)
* feat(hybrid): unflag hybrid output * chore: cleanup rebase errors
This commit is contained in:
parent
5a42d377f9
commit
2683b8e56a
3 changed files with 4 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
import type { AstroConfig } from 'astro';
|
import type { AstroConfig } from 'astro';
|
||||||
|
|
||||||
export function isHybridOutput(config: AstroConfig) {
|
export function isServerLikeOutput(config: AstroConfig) {
|
||||||
return config.experimental.hybridOutput && config.output === 'hybrid';
|
return config.output === 'server' || config.output === 'hybrid';
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
} from '../image/shared.js';
|
} from '../image/shared.js';
|
||||||
import { exposeEnv } from '../lib/env.js';
|
import { exposeEnv } from '../lib/env.js';
|
||||||
import { emptyDir, getVercelOutput, writeJson } from '../lib/fs.js';
|
import { emptyDir, getVercelOutput, writeJson } from '../lib/fs.js';
|
||||||
import { isHybridOutput } from '../lib/prerender.js';
|
import { isServerLikeOutput } from '../lib/prerender.js';
|
||||||
import { getRedirects } from '../lib/redirects.js';
|
import { getRedirects } from '../lib/redirects.js';
|
||||||
|
|
||||||
const PACKAGE_NAME = '@astrojs/vercel/static';
|
const PACKAGE_NAME = '@astrojs/vercel/static';
|
||||||
|
@ -56,7 +56,7 @@ export default function vercelStatic({
|
||||||
setAdapter(getAdapter());
|
setAdapter(getAdapter());
|
||||||
_config = config;
|
_config = config;
|
||||||
|
|
||||||
if (config.output === 'server' || isHybridOutput(config)) {
|
if (isServerLikeOutput(config)) {
|
||||||
throw new Error(`${PACKAGE_NAME} should be used with output: 'static'`);
|
throw new Error(`${PACKAGE_NAME} should be used with output: 'static'`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -27,9 +27,6 @@ describe('Serverless hybrid rendering', () => {
|
||||||
fixture = await loadFixture({
|
fixture = await loadFixture({
|
||||||
root: './fixtures/serverless-prerender/',
|
root: './fixtures/serverless-prerender/',
|
||||||
output: 'hybrid',
|
output: 'hybrid',
|
||||||
experimental: {
|
|
||||||
hybridOutput: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue