mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-08 18:39:20 +08:00
chore: adjust site config (#54844)
This commit is contained in:
@@ -1,6 +1,3 @@
|
|||||||
// prettier-ignore
|
|
||||||
import { scan } from 'react-scan'; // import this BEFORE react
|
|
||||||
|
|
||||||
import React, { useCallback, useEffect } from 'react';
|
import React, { useCallback, useEffect } from 'react';
|
||||||
import {
|
import {
|
||||||
createCache,
|
createCache,
|
||||||
@@ -44,13 +41,6 @@ if (typeof window !== 'undefined') {
|
|||||||
location.hash = `#${hashId.replace(/^components-/, '')}`;
|
location.hash = `#${hashId.replace(/^components-/, '')}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
|
||||||
scan({
|
|
||||||
enabled: false,
|
|
||||||
showToolbar: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getAlgorithm = (themes: ThemeName[] = []) =>
|
const getAlgorithm = (themes: ThemeName[] = []) =>
|
||||||
|
|||||||
19
.dumirc.ts
19
.dumirc.ts
@@ -1,12 +1,12 @@
|
|||||||
|
import os from 'node:os';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { defineConfig } from 'dumi';
|
import { defineConfig } from 'dumi';
|
||||||
import * as fs from 'fs-extra';
|
import * as fs from 'fs-extra';
|
||||||
import os from 'node:os';
|
|
||||||
|
|
||||||
import rehypeAntd from './.dumi/rehypeAntd';
|
import rehypeAntd from './.dumi/rehypeAntd';
|
||||||
import rehypeChangelog from './.dumi/rehypeChangelog';
|
import rehypeChangelog from './.dumi/rehypeChangelog';
|
||||||
import remarkAntd from './.dumi/remarkAntd';
|
|
||||||
import remarkAnchor from './.dumi/remarkAnchor';
|
import remarkAnchor from './.dumi/remarkAnchor';
|
||||||
|
import remarkAntd from './.dumi/remarkAntd';
|
||||||
import { version } from './package.json';
|
import { version } from './package.json';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -193,9 +193,14 @@ export default defineConfig({
|
|||||||
.readFileSync(path.join(__dirname, '.dumi', 'scripts', 'mirror-notify.js'))
|
.readFileSync(path.join(__dirname, '.dumi', 'scripts', 'mirror-notify.js'))
|
||||||
.toString(),
|
.toString(),
|
||||||
},
|
},
|
||||||
{
|
// Only enable clarity in production environment
|
||||||
async: true,
|
process.env.NODE_ENV === 'production'
|
||||||
content: fs.readFileSync(path.join(__dirname, '.dumi', 'scripts', 'clarity.js')).toString(),
|
? {
|
||||||
},
|
async: true,
|
||||||
],
|
content: fs
|
||||||
|
.readFileSync(path.join(__dirname, '.dumi', 'scripts', 'clarity.js'))
|
||||||
|
.toString(),
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
].filter((script) => !!script),
|
||||||
});
|
});
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -77,3 +77,4 @@ __image_snapshots__/
|
|||||||
|
|
||||||
.env
|
.env
|
||||||
examples/
|
examples/
|
||||||
|
components/style/antd.css
|
||||||
|
|||||||
@@ -307,7 +307,6 @@
|
|||||||
"react-intersection-observer": "^9.13.1",
|
"react-intersection-observer": "^9.13.1",
|
||||||
"react-resizable": "^3.0.5",
|
"react-resizable": "^3.0.5",
|
||||||
"react-router-dom": "^7.0.1",
|
"react-router-dom": "^7.0.1",
|
||||||
"react-scan": "^0.4.2",
|
|
||||||
"react-sticky-box": "^2.0.5",
|
"react-sticky-box": "^2.0.5",
|
||||||
"regenerator-runtime": "^0.14.1",
|
"regenerator-runtime": "^0.14.1",
|
||||||
"rehype-stringify": "^10.0.1",
|
"rehype-stringify": "^10.0.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user