2025-11-06 11:00:28 +00:00
|
|
|
import withBundleAnalyzer from '@next/bundle-analyzer';
|
2022-11-05 21:47:12 +00:00
|
|
|
import { withGuildDocs } from '@theguild/components/next.config';
|
|
|
|
|
|
2025-11-06 11:00:28 +00:00
|
|
|
let config = withGuildDocs({
|
2024-03-25 17:32:51 +00:00
|
|
|
output: 'export',
|
2022-11-09 10:55:07 +00:00
|
|
|
eslint: {
|
|
|
|
|
ignoreDuringBuilds: true,
|
|
|
|
|
},
|
2025-01-27 14:58:08 +00:00
|
|
|
experimental: {
|
|
|
|
|
turbo: {
|
|
|
|
|
treeShaking: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2025-09-16 14:18:37 +00:00
|
|
|
|
2025-01-27 14:58:08 +00:00
|
|
|
nextraConfig: {
|
|
|
|
|
contentDirBasePath: '/docs',
|
|
|
|
|
},
|
2023-03-08 09:17:43 +00:00
|
|
|
redirects: async () => [
|
2025-11-10 09:31:44 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/access-tokens',
|
|
|
|
|
destination: '/docs/schema-registry/management/access-tokens',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2023-03-08 09:17:43 +00:00
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/get-started/organizations',
|
|
|
|
|
destination: '/docs/management/organizations',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/get-started/projects',
|
|
|
|
|
destination: '/docs/management/projects',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/get-started/targets',
|
|
|
|
|
destination: '/docs/management/targets',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/features/tokens',
|
|
|
|
|
destination: '/docs/management/targets#manage-tokens',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/features/publish-schema',
|
2024-09-10 12:24:38 +00:00
|
|
|
destination: '/docs/schema-registry#publish-a-schema',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/features/checking-schema',
|
2024-09-10 12:24:38 +00:00
|
|
|
destination: '/docs/schema-registry#check-a-schema',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/features/delete-schema',
|
2024-09-10 12:24:38 +00:00
|
|
|
destination: '/docs/schema-registry#delete-a-service',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/features/registry-usage',
|
2025-09-26 18:31:51 +00:00
|
|
|
destination: '/docs/schema-registry/high-availability-cdn',
|
2024-09-10 12:24:38 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/features/high-availability-cdn',
|
2025-09-26 18:31:51 +00:00
|
|
|
destination: '/docs/schema-registry/high-availability-cdn',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/high-availability-cdn',
|
|
|
|
|
destination: '/docs/schema-registry/high-availability-cdn',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/features/monitoring',
|
2024-09-10 12:24:38 +00:00
|
|
|
destination: '/docs/schema-registry/usage-reporting',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/features/usage-reporting',
|
|
|
|
|
destination: '/docs/schema-registry/usage-reporting',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/features/schema-history',
|
2024-09-10 12:24:38 +00:00
|
|
|
destination: '/docs/schema-registry#schema-history-and-changelog',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/features/integrations',
|
|
|
|
|
destination: '/docs/management/organizations#integrations',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/features/alerts-notifications',
|
|
|
|
|
destination: '/docs/management/projects#alerts-and-notifications',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
2024-09-10 12:24:38 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/management/external-schema-composition',
|
|
|
|
|
destination: '/docs/schema-registry/external-schema-composition',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2023-03-08 09:17:43 +00:00
|
|
|
{
|
2023-03-28 04:51:16 +00:00
|
|
|
source: '/docs/features/external-schema-composition',
|
2024-09-10 12:24:38 +00:00
|
|
|
destination: '/docs/schema-registry/external-schema-composition',
|
2023-03-08 09:17:43 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
2023-11-06 08:59:11 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/specs/schema-reports',
|
|
|
|
|
destination: '/docs/api-reference/cli#publish-a-schema',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2024-04-16 07:46:34 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/self-hosting/apollo-federation-2',
|
2025-09-26 18:31:51 +00:00
|
|
|
destination: '/docs/schema-registry/self-hosting/external-composition',
|
2024-04-16 07:46:34 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/features/sso-oidc-provider',
|
|
|
|
|
destination: '/docs/management/sso-oidc-provider',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2024-09-10 12:24:38 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/features/schema-registry',
|
|
|
|
|
destination: '/docs/schema-registry',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/management/external-schema-composition',
|
|
|
|
|
destination: '/docs/schema-registry/external-schema-composition',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-10-06 21:54:43 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/features/laboratory',
|
|
|
|
|
destination: '/docs/schema-registry/laboratory',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2024-09-10 12:24:38 +00:00
|
|
|
{
|
2025-09-26 18:31:51 +00:00
|
|
|
source: '/docs/features/laboratory/:path*',
|
|
|
|
|
destination: '/docs/schema-registry/laboratory/:path*',
|
2024-09-10 12:24:38 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/management/contracts',
|
|
|
|
|
destination: '/docs/schema-registry/contracts',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/features/schema-policy',
|
|
|
|
|
destination: '/docs/schema-registry/schema-policy',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/features/app-deployments',
|
|
|
|
|
destination: '/docs/schema-registry/app-deployments',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-01-02 13:53:12 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/use-cases/apollo-studio',
|
|
|
|
|
destination: '/docs/use-cases/apollo-graphos',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2026-01-09 10:02:47 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/schema-registry/link-specifications',
|
|
|
|
|
destination: '/docs/api-reference/link-specifications',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-09-26 18:31:51 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/specs/link-specifications',
|
|
|
|
|
destination: '/docs/api-reference/link-specifications',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-10-06 21:54:43 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/graphql-api',
|
|
|
|
|
destination: '/docs/api-reference/graphql-api',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-09-26 18:31:51 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/graphql-api/:path*',
|
|
|
|
|
destination: '/docs/api-reference/graphql-api/:path*',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/specs/usage-reports',
|
|
|
|
|
destination: '/docs/api-reference/usage-reports',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/get-started/:path*',
|
|
|
|
|
destination: '/docs/schema-registry/get-started/:path*',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/management/:path*',
|
|
|
|
|
destination: '/docs/schema-registry/management/:path*',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2024-04-04 09:04:48 +00:00
|
|
|
{
|
|
|
|
|
// SEO: Redirect to the new URL
|
|
|
|
|
source: '/docs/self-hosting/federation-2',
|
2025-09-26 18:31:51 +00:00
|
|
|
destination: '/docs/schema-registry/self-hosting/external-composition',
|
2024-04-04 09:04:48 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-10-06 21:54:43 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/integrations',
|
|
|
|
|
destination: '/docs/other-integrations',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2024-09-10 12:24:38 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/:path*',
|
|
|
|
|
destination: '/docs/other-integrations/:path*',
|
|
|
|
|
permanent: false,
|
|
|
|
|
},
|
2024-11-11 08:14:51 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/api-reference/gateway/cli',
|
2024-11-11 08:39:44 +00:00
|
|
|
destination: '/docs/api-reference/gateway-cli',
|
2024-11-11 08:14:51 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
2024-11-19 16:34:25 +00:00
|
|
|
// Broken links found in Google Search Console
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/api-reference',
|
|
|
|
|
destination: '/docs/api-reference/cli',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/self-hosting',
|
2025-09-26 18:31:51 +00:00
|
|
|
destination: '/docs/schema-registry/self-hosting/get-started',
|
2024-11-19 16:34:25 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/dashboard',
|
2025-09-26 18:31:51 +00:00
|
|
|
destination: '/docs/schema-registry/usage-reporting',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/dashboard/insights',
|
|
|
|
|
destination: '/docs/schema-registry/usage-reporting',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/dashboard/explorer',
|
|
|
|
|
destination: '/docs/schema-registry/explorer',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/dashboard/laboratory/:path*',
|
|
|
|
|
destination: '/docs/schema-registry/laboratory/:path*',
|
2024-11-19 16:34:25 +00:00
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/code-first',
|
|
|
|
|
destination: '/docs/other-integrations/code-first',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/product-updates/2024-01-25-schema-contracts-for-federation',
|
|
|
|
|
destination: '/product-updates/2024-02-06-schema-contracts-for-federation',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/apollo-router',
|
|
|
|
|
destination: '/docs/other-integrations/apollo-router',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/envelop',
|
|
|
|
|
destination: '/docs/other-integrations/envelop',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/schema-stitching',
|
|
|
|
|
destination: '/docs/other-integrations/schema-stitching',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/apollo-gateway',
|
|
|
|
|
destination: '/docs/other-integrations/apollo-gateway',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/graphql-code-generator',
|
|
|
|
|
destination: '/docs/other-integrations/graphql-code-generator',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/ci-cd',
|
|
|
|
|
destination: '/docs/other-integrations/ci-cd',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/apollo-server',
|
|
|
|
|
destination: '/docs/other-integrations/apollo-server',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/graphql-ruby',
|
|
|
|
|
destination: '/docs/other-integrations/graphql-ruby',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/graphql-mesh',
|
|
|
|
|
destination: '/docs/gateway',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: '/docs/integrations/graphql-yoga',
|
|
|
|
|
destination: '/docs/other-integrations/graphql-yoga',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2024-12-02 20:37:37 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/gateway/deployment/node-frameworks',
|
|
|
|
|
destination: '/docs/gateway/deployment/runtimes/nodejs',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-09-04 16:23:13 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/gateway/other-features/performance/deduplicate-request',
|
|
|
|
|
destination: '/docs/gateway/other-features/performance/deduplicate-inflight-requests',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-09-26 18:31:51 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/self-hosting/:path*',
|
|
|
|
|
destination: '/docs/schema-registry/self-hosting/:path*',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2025-11-14 12:34:11 +00:00
|
|
|
{
|
|
|
|
|
source: '/docs/gateway/other-features/router-runtime',
|
|
|
|
|
destination: '/docs/gateway/other-features/rust-query-planner',
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
2023-03-08 09:17:43 +00:00
|
|
|
],
|
2025-01-27 14:58:08 +00:00
|
|
|
env: {
|
|
|
|
|
SITE_URL: 'https://the-guild.dev/graphql/hive',
|
2025-01-29 12:51:48 +00:00
|
|
|
NEXT_BASE_PATH: process.env.NEXT_BASE_PATH,
|
2025-01-27 14:58:08 +00:00
|
|
|
},
|
2023-10-10 12:29:42 +00:00
|
|
|
webpack: (config, { webpack }) => {
|
|
|
|
|
config.externals['node:fs'] = 'commonjs node:fs';
|
|
|
|
|
config.externals['node:path'] = 'commonjs node:path';
|
2023-10-06 14:39:50 +00:00
|
|
|
|
2023-10-10 12:29:42 +00:00
|
|
|
config.resolve.fallback = {
|
|
|
|
|
...config.resolve.fallback,
|
|
|
|
|
fs: false,
|
|
|
|
|
};
|
|
|
|
|
config.plugins.push(
|
|
|
|
|
new webpack.NormalModuleReplacementPlugin(/^node:/, resource => {
|
|
|
|
|
resource.request = resource.request.replace(/^node:/, '');
|
|
|
|
|
}),
|
2023-10-06 14:39:50 +00:00
|
|
|
);
|
|
|
|
|
|
2023-10-10 12:29:42 +00:00
|
|
|
return config;
|
2023-10-06 14:39:50 +00:00
|
|
|
},
|
2022-11-09 10:55:07 +00:00
|
|
|
});
|
2025-11-06 11:00:28 +00:00
|
|
|
|
|
|
|
|
if (process.env.ANALYZE === 'true') {
|
|
|
|
|
config = withBundleAnalyzer({ enabled: true })(config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default config;
|