这是我参与「第五届青训营 」伴学笔记创作活动的第 19 天
团队使用dumi写自己的组件文档,进行相关配置的时候,因为一些版本问题一起不起作用,最后发现是因为dumi的配置文件方面有问题,版本方面有写混乱。初始的使用.umirc.ts但是因为版本问题,应该使用.dumir.ts的配置项来配置相关配置才会起作用。
import { defineConfig } from 'dumi';
export default defineConfig({
favicons: ['https://s1.imagehub.cc/images/2023/02/20/e28db97a308044b70ff79a5d5032928a.png'],
// autoAlias: false,
// outputPath: 'docs-dist',
themeConfig: {
// hd: { rules: [] },
rtl: true,
name: 'RomanticUI',
logo: 'https://s1.imagehub.cc/images/2023/02/20/e28db97a308044b70ff79a5d5032928a.png',
footer: `Open-source MIT Licensed | Copyright © 2023-present
<br />
Powered by Romantic team`,
prefersColor: { default: 'auto' },
socialLinks: {
github: 'https://github.com/RomanticUI/RomanticUI',
},
},
...(process.env.NODE_ENV === 'development' ? {} : { ssr: {} }),
//设置域名前缀
// sitemap: { hostname: 'https://d.umijs.org' },
});