Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
chore(web): refactor next.config.js to next.config.ts (#31331)
Bowen Liangd4f5a113ed0f
diff --git a/web/next.config.js b/web/next.config.tssimilarity index 88%rename from web/next.config.jsrename to web/next.config.tsindex 1457d638c4e..fc4dee32896 100644--- a/web/next.config.js+++ b/web/next.config.ts@@ -1,3 +1,4 @@+import type { NextConfig } from 'next'import process from 'node:process'import withBundleAnalyzerInit from '@next/bundle-analyzer'import createMDX from '@next/mdx'@@ -24,10 +25,9 @@ const withBundleAnalyzer = withBundleAnalyzerInit({const hasSetWebPrefix = process.env.NEXT_PUBLIC_WEB_PREFIXconst port = process.env.PORT || 3000const locImageURLs = !hasSetWebPrefix ? [new URL(`http://localhost:${port}/**`), new URL(`http://127.0.0.1:${port}/**`)] : []-const remoteImageURLs = [hasSetWebPrefix ? new URL(`${process.env.NEXT_PUBLIC_WEB_PREFIX}/**`) : '', ...locImageURLs].filter(item => !!item)+const remoteImageURLs = ([hasSetWebPrefix ? new URL(`${process.env.NEXT_PUBLIC_WEB_PREFIX}/**`) : '', ...locImageURLs].filter(item => !!item)) as URL[]-/** @type {import('next').NextConfig} */-const nextConfig = {+const nextConfig: NextConfig = {basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',serverExternalPackages: ['esbuild-wasm'],transpilePackages: ['echarts', 'zrender'],@@ -42,7 +42,7 @@ const nextConfig = {// https://nextjs.org/docs/messages/next-image-unconfigured-hostimages: {remotePatterns: remoteImageURLs.map(remoteImageURL => ({- protocol: remoteImageURL.protocol.replace(':', ''),+ protocol: remoteImageURL.protocol.replace(':', '') as 'http' | 'https',hostname: remoteImageURL.hostname,port: remoteImageURL.port,pathname: remoteImageURL.pathname,