Skip to content
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的时候能否先判断lib下对应组件下是否存在style,如果不存在就不reqiuire css了 #178

Open
zhangchao828 opened this issue Sep 21, 2017 · 6 comments

Comments

@zhangchao828
Copy link

比如有些组件就是纯逻辑的组件,没有写style,那么这个时候就会报错提示Module not found

@ssehacker
Copy link

+1

1 similar comment
@trexguo
Copy link

trexguo commented Dec 30, 2018

+1

@hucheng91
Copy link

+1,楼上1年前没人理,我来提个PR

@hucheng91
Copy link

@zhangchao828 @ssehacker style可以返回 函数

['import', {
libraryName: '@qtt/hobbit',
libraryDirectory: 'es',
"style": (name) => {
console.log('tag', name)
if (name == ‘逻辑模块') {
return false;
}
return ${name}/style;
}

@chj-damon
Copy link

+1. It doesn't make sense.

@tigressbailey
Copy link

Same issue here.
Already used

if (name == 'not-existing-path') {
  return false;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants