-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
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
dumi +antd 执行father build后,antd样式并没有进行打包 #537
Comments
也就是说,我如果在项目中引入该组件库,如果项目没有引入antd和tailwindcss的话,那么组件库的关于antd和tailwindcss的样式就会失效 |
esm 是 bundless 构建、不打包是预期结果,只要产物里有引入样式,项目就会编译 关于样式打包,father 只会对 umd 产物做打包,其他都是 bundless 模式,可以在文档中查看两种模式的介绍:https://github.com/umijs/father/blob/master/docs/guide/build-mode.md ref: #514 |
那在我的理解来说,我想在React中使用我的组件库(Antd + TailWindCss),没有解决方案了吗? |
第三方组件库不应该在 正确的做法是将这些库都放到 // package.json
{
"devDependencies": {
"react": "",
"antd": ""
},
"peerDependencies": {
"react": "",
"antd": ""
}
} 该包发布到 npm 后,安装此包的项目主体在使用时,自己也必须要安装有对应的 理想情况下,第三方包应该尽量减少 |
dumi +antd 执行father build后,antd样式和TailWindCss样式并没有进行打包,并且发布到npm库上面,下载下来,组件库的node_modules中也没有antd
The text was updated successfully, but these errors were encountered: