Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

webpack-plugin-fr-theme

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-plugin-fr-theme

form-render theme plugin

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

webpack-plugin-fr-theme

form-render支持antd自定义主题

使用

安装

yarn add webpack-plugin-fr-theme --dev

or

npm install --save-dev webpack-plugin-fr-theme

配置

// webpack.config.js

const WebpackPluginFrTheme = require('webpack-plugin-fr-theme');

{
  ...

  plugins: [
    new WebpackPluginFrTheme(),
  ],

  ...
}

实现

form-render对于antd的组件样式默认是引用css样式,如果项目中已经使用了antd自定义主题,这时候form-render引用的css文件会覆盖项目中的自定义样式。

因为自定义样式是通过less注入全局的样式变量来实现的,所以通过webpack plugin手动修改form-render中antd引用的样式文件,将style/css替换成style/index,去引用antd对应组件的less文件。

Keywords

webpack

FAQs

Package last updated on 01 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts