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

fix: css import miss common.css #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Runnnnn
Copy link

@Runnnnn Runnnnn commented Jun 12, 2023

[email protected] 目前编译后的 app.css 如下,已经修复了该问题,Taro 修复的PR

@import "./app-origin.css";
@import "./common.css";

不会存在如下 import 在其他规则之后的情况,导致样式失效的问题了

page{background-color:#0ff}
@import "./common.css";

所以应该不需要之前的特殊处理了,之前的特殊处理默认取的 match[0] 现在是 app-origin.css,会导致 common.css 没有引入,从而使组件库里的样式不生效了。

if (content !== '' && match?.length) {
  assets['app.css'] = new ConcatSource(match[0], content.replace(COMMON_CSS_REG, ''))
}

@AdvancedCat
Copy link
Member

@Hubmeat Review this PR

@yuuk
Copy link

yuuk commented Mar 21, 2024

求合并

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

Successfully merging this pull request may close these issues.

None yet

3 participants