StyleX example doesn't setup styles correctly
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- build-system, frontend
Hướng nghiên cứu
Start with the rsbuild/stylex example, its package.json build script, and the generated stylex.css referenced in the report. Reproduce with rsbuild build, then compare the production HTML and CSS output with the linked unplugin-stylex example's public/index.html. Done means production styles load without runtime injection and output.inlineStyles handles stylex.css as intended.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
(1) Files generated by rsbuild stylex example do not use the stylex.css file.
Instead styles are present because of StyleX runtimeInjection=true feature, which should be disabled for production builds,
(2) yet apparently it is enabled for production builds
(production builds being considered the result of rsbuild build command, i.e. "build" script in package.json)
and if runtimeInjection is force-disabled like this:
tools: {
rspack: {
plugins: [stylexPlugin({
stylex: {
runtimeInjection: false,
}
})],
},
},
then styles are not loaded by the browser at all
The unplugin-stylex rsbuild example solves this by embedding the <link rel="stylesheet" href="stylex.css"> to the template index.html
(3) As a result, the output.inlineStyles=true doesn't work for the stylex.css file generated by the plugin.
(the reason I wrote this github-issue is because of this third problem)
Git repo to reproduce: https://github.com/mechan1sm/stylex-bug-reproduce-1
- Ngôn ngữ chính
- TypeScript
- Star
- 168
- Fork
- 47
- Merge trung bình
- 3 giờ 45 phút
- Pull request đã merge (30 ngày)
- 11
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rstackjs/rstack-examples
-
能帮忙看下吗?如果我配置了 workspace Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
rstackjs/rstack-examples#416 ·
-
rstackjs/rstack-examples#331 · 1 bình luận · 1 người được giao ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
rstackjs/rstack-examples#231 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
rstackjs/rstack-examples#190 ·
-
PR welcome
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
rstackjs/rstack-examples#144 ·
Tất cả issue của rstackjs/rstack-examples
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Add: Star Sports 2 Telugu HD Đang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
usability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
inmanta/web-console#7367 ·