We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
希望能够增加umijs中导入WebpackPluginFrTheme的样例。
我使用的是and pro和umijs,我应该如何定义WebpackPluginFrTheme,我尝试在 plugins中直接增加如umi-plugin-pro-bloc的格式,但是会报错。 [ 'umi-plugin-pro-block', { moveMock: false, moveService: false, modifyRequest: true, autoAddMenu: true, }, ], [ 'webpackPluginFrTheme', new WebpackPluginFrTheme(), ], 报错如下: Error: Plugin WebpackPluginFrTheme can't be resolved
The text was updated successfully, but these errors were encountered:
另外,为什么引用render组件会污染全局主题呢?很不理解。
Sorry, something went wrong.
同问,在umi中如何使用WebpackPluginFrTheme
chainWebpack(config, { webpack }) { config.plugin('WebpackPluginFrTheme').use(WebpackPluginFrTheme) }
form-render里面对于antd的组件使用的是css样式文件,这个样式是antd的默认主题,并且在webpack打包的时候antd组件的css样式文件的优先级高于自定义主题less文件的优先级,所以会产生自定义主题失效的问题
WebpackPluginFrTheme这个插件在webpack收集依赖之前,对form-render的antd组件样式进行动态替换,通过babel分析语法,将css文件替换成less文件,这样就不会污染自定义主题了
FateRiddle
No branches or pull requests
希望能够增加umijs中导入WebpackPluginFrTheme的样例。
我使用的是and pro和umijs,我应该如何定义WebpackPluginFrTheme,我尝试在
plugins中直接增加如umi-plugin-pro-bloc的格式,但是会报错。
[
'umi-plugin-pro-block',
{
moveMock: false,
moveService: false,
modifyRequest: true,
autoAddMenu: true,
},
],
[
'webpackPluginFrTheme',
new WebpackPluginFrTheme(),
],
报错如下:
Error: Plugin WebpackPluginFrTheme can't be resolved
The text was updated successfully, but these errors were encountered: