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

feat: import path for global styles #28

Merged
merged 9 commits into from
Nov 13, 2024

Conversation

iamwangqing
Copy link
Contributor

Add write src/global.{less,css} to client entry. The issue address is no.26

Copy link

changeset-bot bot commented Nov 12, 2024

🦋 Changeset detected

Latest commit: 292a896

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sorrycc
Copy link
Member

sorrycc commented Nov 12, 2024

提交前记得执行下 pnpm ci 。

@iamwangqing
Copy link
Contributor Author

好的,下次注意

@xiaohuoni
Copy link
Member

@iamwangqing changeset 没提交

src/sync.ts Outdated
${globalStyleImportPath}
${tailwindcssPath ? `import '${tailwindcssPath}'` : ''}
${overridesStyleImportPath}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overrides 不要,这个如果要加得讨论下,感觉需求不强烈。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overrides 在这里不能达到预期的效果。
然后,在 umi 里面,global.css 的歧义很大,由于页面都是 lazy load 的,所以在 global 写的组件(多为 antd)样式,并不会生效。所以使用到 antd 的时候,overrides 几乎是必须的。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那暂时先不加吗,等讨论确定之后在加?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sorrycc sorrycc changed the title feat:import path for global styles feat: import path for global styles Nov 13, 2024
@sorrycc sorrycc merged commit 599a505 into umijs:master Nov 13, 2024
3 checks passed
@github-actions github-actions bot mentioned this pull request Nov 12, 2024
@github-actions github-actions bot mentioned this pull request Dec 6, 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.

3 participants