-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
使用css modules引入的样式无效 #650
Comments
组件打包需要手动在 .fatherrc 配 cssModules,参考:https://github.com/umijs/father#cssmodules |
如果我想用 .global.less 不走 cssModule 需要怎么配置? 开启之后好像所有都走cssModule 已解决: 只需要配置 cssModules: {
generateScopedName: '[local]___[hash:base64:5]',
globalModulePaths: [/\.global.less$/]
}, |
请问这个问题你解决了嘛,可以讨论下吗 |
css-module配置后,打包es内容会发生变更么,项目中使用组件,并没做css modules的支持 |
@ChenYCL rollup 模式不影响;如果是 babel 模式的产物 + 项目里没有 CSS Modules 配置,那么 |
你好,这个配置是不是有变动了,并未找到这个参数呀 |
https://d.umijs.org/guide/faq#%E4%B8%BA%E4%BB%80%E4%B9%88%E4%B8%8D%E6%94%AF%E6%8C%81-css-modules 已经明确不支持了 |
// test.less
.test { color: red; }
// test.tsx
import styles from './test.less';
<span className={styles.test}>测试</span>
这种形式最终生成的代码,span并没有样式
<span>测试</span>
The text was updated successfully, but these errors were encountered: