我一直在制作一个https://astro.build网站,过了一段时间后,运行astro preview it错误。这是我的astro.config.mjs代码:
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel/serverless';
import serviceWorker from 'astrojs-service-worker';
export default defineConfig({
trailingSlash: 'ignore',
output: 'server',
adapter: vercel(),
integrations: [serviceWorker()],
});任何帮助都将不胜感激。

发布于 2022-10-27 02:45:56
除了节点适配器之外,您不能使用astro preview预览SSR适配器的构建。
我引用文档的话
因为Astro1.5.0,如果你使用支持它的适配器的话,星体预览也适用于SSR构建。目前,只有节点适配器支持天文预览。
https://stackoverflow.com/questions/74119829
复制相似问题