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

[Bug]: The zero-width character output in CSS is garbled [there will be problems in the browser occasionally] #9370

Open
Sunny-117 opened this issue Feb 19, 2025 · 10 comments
Labels
pending triage The issue/PR is currently untouched.

Comments

@Sunny-117
Copy link
Contributor

System Info

macOS
chrome

Details

Image

地址:https://tuiguang-s3.bdstatic.com/commonLibs/static/js/48523.a6267238.chunk.css

页面渲染出问题:
Image

Reproduce link

No response

Reproduce Steps

Image

地址:https://tuiguang-s3.bdstatic.com/commonLibs/static/js/48523.a6267238.chunk.css

@Sunny-117 Sunny-117 added the pending triage The issue/PR is currently untouched. label Feb 19, 2025
@Sunny-117
Copy link
Contributor Author

组件库源码:

Image

@Sunny-117
Copy link
Contributor Author

  • nodejs: 20.0.0
    - pnpm: 8.3.1

@Sunny-117
Copy link
Contributor Author

Image

@chenjiahan chenjiahan changed the title [Bug]: css中零宽字符打包产物乱码【在浏览器偶发会有问题】 [Bug]: The zero-width character output in CSS is garbled [there will be problems in the browser occasionally] Feb 19, 2025
@JSerFeng JSerFeng self-assigned this Feb 19, 2025
@JSerFeng
Copy link
Contributor

Could you give me a minimal repro with necessary config?

@JSerFeng JSerFeng removed their assignment Feb 19, 2025
Copy link
Contributor

Hello @Sunny-117, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction will be closed if no activities in 14 days.

@Sunny-117
Copy link
Contributor Author

Could you give me a minimal repro with necessary config?

pnpm create rspack@latest

更改css:

.card {
  padding: 2em;
  &::before {
      content: "\200b";
  } 
}

pnpm build

Image

@Sunny-117
Copy link
Contributor Author

@Sunny-117
Copy link
Contributor Author

Sunny-117 commented Feb 19, 2025

这是webpack的产物:op-sources/rspack_css_bug@ee56167

Image

@hardfist
Copy link
Contributor

@Sunny-117 can you try the latest 1.2.5 version and it maybe fixed

@Sunny-117
Copy link
Contributor Author

@Sunny-117 can you try the latest 1.2.5 version and it maybe fixed

I updated to 1.2.5, but the CSS zero width character product still hasn't changed

Image

op-sources/rspack_css_bug@cd1224c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

3 participants