> Discover all available pages from the documentation index: https://mastra.zisheng.pro/llms.txt # 通过 Web 框架部署 当 Mastra 与 Web 框架集成时,它会使用框架的标准部署流程与应用一起部署。请按照以下说明操作,确保 Mastra 集成正确部署。 > **注意:** 如果要部署到云 Provider,请从 Mastra 配置中移除所有 [LibSQLStore](https://mastra.zisheng.pro/reference/storage/libsql) 用法。LibSQLStore 需要文件系统访问权限,与 serverless 平台不兼容。 集成指南: - [与 Next.js 配合使用](https://mastra.zisheng.pro/guides/getting-started/next-js) - [与 Astro 配合使用](https://mastra.zisheng.pro/guides/getting-started/astro) ## 在 Vercel 上与 Next.js 配合使用 如果你已[按照我们的指南](https://mastra.zisheng.pro/guides/getting-started/next-js)将 Mastra 与 Next.js 集成,并计划部署到 Vercel,请将 `serverExternalPackages: ["@mastra/*"]` 添加到 `next.config.ts`: ```typescript import type { NextConfig } from 'next' const nextConfig: NextConfig = { serverExternalPackages: ['@mastra/*'], } export default nextConfig ``` ## 在 Vercel 上与 Astro 配合使用 如果你已[按照我们的指南](https://mastra.zisheng.pro/guides/getting-started/astro)将 Mastra 与 Astro 集成,并计划部署到 Vercel,请在 `astro.config.mjs` 中添加 Vercel 适配器和 Server 输出: ```javascript import { defineConfig } from 'astro/config' import vercel from '@astrojs/vercel' export default defineConfig({ adapter: vercel(), output: 'server', }) ``` ## 在 Netlify 上与 Astro 配合使用 如果你已[按照我们的指南](https://mastra.zisheng.pro/guides/getting-started/astro)将 Mastra 与 Astro 集成,并计划部署到 Netlify,请在 `astro.config.mjs` 中添加 Netlify 适配器和 Server 输出: ```javascript import { defineConfig } from 'astro/config' import netlify from '@astrojs/netlify' export default defineConfig({ adapter: netlify(), output: 'server', }) ```