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

约定式的 src/global.{less,css} #26

Closed
sorrycc opened this issue Nov 12, 2024 · 4 comments
Closed

约定式的 src/global.{less,css} #26

sorrycc opened this issue Nov 12, 2024 · 4 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@sorrycc
Copy link
Member

sorrycc commented Nov 12, 2024

Problem

沿袭之前 Umi 的约定,目前 src/global.{less,css} 没有生效。但实际 example 里又发现这类需求无法避免。

Solution

修改 src/sync.ts,当存在 src/global.{less,css} 时,在临时生成的 client.tsx 里增加对此文件的 import 。

Importance

would make my life easier

@sorrycc sorrycc added the good first issue Good for newcomers label Nov 12, 2024
@iamwangqing
Copy link
Contributor

认领

@xiaohuoni
Copy link
Member

@iamwangqing
可以顺便和 overrides 一起做了,
global 最前,权重最低。
overrides.(css|less) 最后,权重最高。

@sorrycc
Copy link
Member Author

sorrycc commented Nov 13, 2024

Closed via #28

@sorrycc sorrycc closed this as completed Nov 13, 2024
@sorrycc
Copy link
Member Author

sorrycc commented Nov 13, 2024

overrides 有点麻烦的,基于之前 umi 的实现的话,得自动加一些 wrapper 来增加权重。但如果增加 wrapper,在 global.less 里手动增加也能解决这个问题。这是我纠结的点。

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

No branches or pull requests

3 participants