mirror of
https://github.com/labring/FastGPT.git
synced 2026-04-22 01:01:28 +08:00
Doc (#6493)
* cloud doc * doc refactor * doc move * seo * remove doc * yml * doc * fix: tsconfig * fix: tsconfig
This commit is contained in:
@@ -19,6 +19,8 @@ const nextConfig: NextConfig = {
|
||||
// 开发环境关闭 strict mode,避免第三方库的双重渲染问题
|
||||
reactStrictMode: !isDev,
|
||||
productionBrowserSourceMaps: false,
|
||||
// 启用 SWC 压缩
|
||||
swcMinify: true,
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
@@ -99,7 +101,19 @@ const nextConfig: NextConfig = {
|
||||
if (isDev && !isServer) {
|
||||
config.watchOptions = {
|
||||
...config.watchOptions,
|
||||
ignored: ['**/node_modules', '**/.git', '**/dist', '**/coverage']
|
||||
ignored: [
|
||||
'**/node_modules',
|
||||
'**/.git',
|
||||
'**/dist',
|
||||
'**/coverage',
|
||||
'../../packages/**/node_modules',
|
||||
'../../packages/**/dist',
|
||||
'**/.next',
|
||||
'**/out'
|
||||
],
|
||||
// 减少轮询频率,降低 CPU 和内存占用
|
||||
poll: 1000,
|
||||
aggregateTimeout: 300
|
||||
};
|
||||
}
|
||||
|
||||
@@ -127,7 +141,9 @@ const nextConfig: NextConfig = {
|
||||
'@emotion/styled'
|
||||
],
|
||||
// 按页面拆分 CSS chunk,减少首屏 CSS 体积
|
||||
cssChunking: 'strict'
|
||||
cssChunking: 'strict',
|
||||
// 减少内存占用
|
||||
memoryBasedWorkersCount: true
|
||||
},
|
||||
outputFileTracingRoot: path.join(__dirname, '../../')
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "4.14.7",
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"dev": "npm run build:workers && next dev",
|
||||
"dev": "NODE_OPTIONS='--max-old-space-size=8192' npm run build:workers && next dev",
|
||||
"build": "npm run build:workers && npm run lint && npm run typecheck && next build --debug",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
|
||||
@@ -24,14 +24,14 @@ const PolicyTip = ({ isCenter }: { isCenter: boolean }) => {
|
||||
div: <Flex justifyContent={'center'} />,
|
||||
termsLink: (
|
||||
<Link
|
||||
href={getDocPath('/docs/protocol/terms/')}
|
||||
href={getDocPath('/docs/introduction/cloud/terms/')}
|
||||
target={'_blank'}
|
||||
color={'primary.700'}
|
||||
/>
|
||||
),
|
||||
privacyLink: (
|
||||
<Link
|
||||
href={getDocPath('/docs/protocol/privacy/')}
|
||||
href={getDocPath('/docs/introduction/cloud/privacy/')}
|
||||
target={'_blank'}
|
||||
color={'primary.700'}
|
||||
/>
|
||||
|
||||
@@ -75,7 +75,7 @@ const CookiesModal = () => {
|
||||
textDecorationLine={'underline'}
|
||||
cursor={'pointer'}
|
||||
w={'fit-content'}
|
||||
onClick={() => window.open(getDocPath('/docs/protocol/privacy/'), '_blank')}
|
||||
onClick={() => window.open(getDocPath('/docs/introduction/cloud/privacy/'), '_blank')}
|
||||
>
|
||||
{t('login:privacy_policy')}
|
||||
</Box>
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
"@t3-oss/env-core": ["../../packages/service/node_modules/@t3-oss/env-core/dist/index.d.ts"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "../../packages/**/*.ts"],
|
||||
"exclude": ["**/*.test.ts"]
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
"../../packages/**/*.ts",
|
||||
"../../packages/**/*.tsx"
|
||||
],
|
||||
"exclude": ["**/*.test.ts", "**/*.test.tsx", ".next", "dist", "coverage"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user