代码拉取完成,页面将自动刷新
同步操作将从 umijs/umi 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// Config for dumi
import { defineConfig } from 'umi';
function getMenus(opts: { lang?: string; base: '/docs' | '/plugins' }) {
const menus = {
'/plugins': [
{
title: 'Presets',
children: ['/plugins/preset-react'],
},
{
title: 'Plugins',
children: [
'/plugins/plugin-access',
'/plugins/plugin-analytics',
'/plugins/plugin-antd',
'/plugins/plugin-crossorigin',
'/plugins/plugin-dva',
'/plugins/plugin-esbuild',
'/plugins/plugin-helmet',
'/plugins/plugin-initial-state',
'/plugins/plugin-layout',
'/plugins/plugin-locale',
'/plugins/plugin-model',
'/plugins/plugin-preact',
'/plugins/plugin-qiankun',
'/plugins/plugin-request',
'/plugins/plugin-sass',
],
},
{
title: 'Plugin Develop',
'title_zh-CN': '插件开发',
children: ['/plugins/api', '/plugins/best-practice'],
},
],
'/docs': [
{
title: 'VERSION 3.X',
children: [],
},
{
title: 'Introduce',
'title_zh-CN': '介绍',
children: [
'/docs/README',
'/docs/how-umi-works',
'/docs/getting-started',
],
},
{
title: 'Umi Basic',
'title_zh-CN': 'Umi 基础',
children: [
'/docs/directory-structure',
'/docs/config',
'/docs/runtime-config',
'/docs/routing',
'/docs/convention-routing',
'/docs/plugin',
'/docs/navigate-between-pages',
'/docs/html-template',
'/docs/mock',
'/docs/env-variables',
'/docs/cli',
],
},
{
title: 'Styles and Assets',
'title_zh-CN': '样式和资源文件',
children: ['/docs/assets-css', '/docs/assets-image'],
},
{
title: 'Umi Advanced',
'title_zh-CN': 'Umi 进阶',
children: [
'/docs/load-on-demand',
'/docs/fast-refresh',
'/docs/deployment',
'/docs/use-umi-ui',
'/docs/ssr',
'/docs/mfsu',
],
},
{
title: 'Upgrade to Umi 3',
'title_zh-CN': '升级到 Umi 3',
path: '/docs/upgrade-to-umi-3',
},
{
title: 'CONTRIBUTING',
'title_zh-CN': '贡献',
path: '/docs/contributing',
},
{
title: 'FAQ',
path: '/docs/faq',
},
],
};
return (menus[opts.base] as []).map((menu: any) => {
if (!opts.lang) return menu;
return {
...menu,
title: menu[`title_${opts.lang}`] || menu.title,
};
});
}
const isDev = process.env.NODE_ENV === 'development';
export default defineConfig({
...(isDev
? {
webpack5: {},
dynamicImport: {},
mfsu: {},
}
: {
ssr: {},
}),
favicon: 'https://img.alicdn.com/tfs/TB1YHEpwUT1gK0jSZFhXXaAtVXa-28-27.svg',
mode: 'site',
title: 'UmiJS',
resolve: {
includes: ['./docs'],
previewLangs: [],
},
menus: {
'/zh-CN/docs': getMenus({ lang: 'zh-CN', base: '/docs' }),
'/docs': getMenus({ base: '/docs' }),
'/zh-CN/plugins': getMenus({ lang: 'zh-CN', base: '/plugins' }),
'/plugins': getMenus({ base: '/plugins' }),
},
navs: [
null,
{
title: 'v2.x',
path: 'https://v2.umijs.org',
},
{
title: 'GitHub',
path: 'https://github.com/umijs/umi',
},
],
polyfill: false,
nodeModulesTransform: {
type: 'none',
},
exportStatic: {},
analytics: isDev
? false
: {
ga: 'UA-149864185-1',
},
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。