Skip to content

docs: prefer to use the postcss plugin of unocss#5594

Merged
chenjiahan merged 1 commit intomainfrom
unocss_docs_0714
Jul 14, 2025
Merged

docs: prefer to use the postcss plugin of unocss#5594
chenjiahan merged 1 commit intomainfrom
unocss_docs_0714

Conversation

@chenjiahan
Copy link
Member

Summary

The PR reverts #4287 and adds the @unocss/postcss guide back, as @unocss/webpack has some limitations.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings July 14, 2025 14:36
@netlify
Copy link

netlify bot commented Jul 14, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit dda09ca
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/687515d223cab8000892994b
😎 Deploy Preview https://deploy-preview-5594--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 77 (🟢 up 3 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reverts the previous Webpack-based UnoCSS integration and restores the PostCSS plugin approach in the documentation.

  • Switched from @unocss/webpack to unocss & @unocss/postcss in install instructions
  • Replaced Rsbuild/Webpack plugin setup with a postcss.config.mjs example
  • Updated config and CSS import steps in both Chinese and English guides

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
website/docs/zh/guide/styling/unocss.mdx 用 PostCSS 插件取代 @unocss/webpack 集成示例,并更新安装与配置步骤
website/docs/en/guide/styling/unocss.mdx Updated to use PostCSS plugin instead of Webpack, adjusted commands and setup
Comments suppressed due to low confidence (3)

website/docs/zh/guide/styling/unocss.mdx:5

  • 建议为 PostCSS 插件 添加指向 @unocss/postcss npm 包的链接,以便读者快速访问该插件的详细信息。
你可以通过 PostCSS 插件来在 Rsbuild 中接入 UnoCSS。

website/docs/zh/guide/styling/unocss.mdx:27

  • 考虑在此处添加一条注释,提示读者 Rsbuild 已集成 Autoprefixer,可以直接只注册 UnoCSS 插件。
## 配置 UnoCSS

website/docs/en/guide/styling/unocss.mdx:9

  • Consider adding hyperlinks to the npm pages for unocss and @unocss/postcss so readers can easily access the package documentation.
You need to install `unocss` and `@unocss/postcss` first.

@chenjiahan chenjiahan merged commit db778ce into main Jul 14, 2025
12 checks passed
@chenjiahan chenjiahan deleted the unocss_docs_0714 branch July 14, 2025 14:38
@chenjiahan chenjiahan mentioned this pull request Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant