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: styled-components plugin #11726

Merged
merged 17 commits into from
Nov 7, 2023
Merged

Conversation

fz6m
Copy link
Contributor

@fz6m fz6m commented Oct 11, 2023

close #11338

这是 #11167 的新 PR ,由于 #11719 进行了错误、无效的修复,遂重开这个 PR 。

此 PR 包含以下内容:

  1. 修复 sc babel 插件不生效的问题。将 sc babel 插件移出到 @umijs/plugins 下面额外添加,这是因为 sc babel 插件不能和 babel preset env 配置在一起,详见 displayName is broken since v1.10.3 styled-components/babel-plugin-styled-components#261

  2. 优化 sc babel plugin 默认配置,以在更多场景都默认好用,并添加文档。

  3. 升级 sc 依赖版本。

  4. 自动修复 qiankun 子应用切换样式丢失。

  5. 支持浏览器前缀自动降级( sc v6 正式版不再默认添加浏览器前缀,当用户配置 ie 或 legacy 选项时自动降级添加前缀)。

@vercel
Copy link

vercel bot commented Oct 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
umi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2023 0:18am

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (b3b956a) 28.98% compared to head (2cc6ea4) 28.95%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11726      +/-   ##
==========================================
- Coverage   28.98%   28.95%   -0.04%     
==========================================
  Files         488      488              
  Lines       14847    14863      +16     
  Branches     3519     3530      +11     
==========================================
- Hits         4304     4303       -1     
- Misses       9784     9802      +18     
+ Partials      759      758       -1     
Files Coverage Δ
packages/babel-preset-umi/src/index.ts 100.00% <ø> (ø)
packages/renderer-react/src/browser.tsx 0.00% <0.00%> (ø)
packages/plugins/src/styled-components.ts 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fz6m fz6m merged commit 84b5ca1 into umijs:master Nov 7, 2023
24 of 25 checks passed
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.

【Task】升级 SC 到 v6
1 participant