/umi-plugin-theme

基于 umi3.x 开发的插件,用于提取 Ant Design 样式主题文件(如 dark.less),并生成对应的 CSS,从而实现网站主题的动态切换。

Primary LanguageJavaScript

umi-plugin-theme

Install

# or yarn
$ npm install umi-plugin-theme -D

Usage

Configure theme.config.ts in config dir.

eg.

// theme.config.ts
export default {
  theme: [
    {
      stylePath: require.resolve('antd/lib/style/themes/dark.less'), // your theme file path.
      fileName: 'dark.css', // the generated css file name.
    }
  ]
}

LICENSE

MIT