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: build site failed in V3.0 #2682

Merged
merged 3 commits into from
Oct 31, 2024
Merged

fix: build site failed in V3.0 #2682

merged 3 commits into from
Oct 31, 2024

Conversation

Alex-huxiyang
Copy link
Collaborator

@Alex-huxiyang Alex-huxiyang commented Oct 31, 2024

Summary by CodeRabbit

  • 新功能

    • 更新了本地化路径,标准化了命名约定。
    • 更新了CSS预处理器选项,采用现代编译器。
  • 样式

    • 调整了CI工作流配置文件的缩进,以确保一致性。
    • 为NutUI-React Taro H5 Demo构建步骤添加了条件语句,仅在next分支运行。

Copy link

coderabbitai bot commented Oct 31, 2024

Walkthrough

此次更改主要集中在 vite.config.site.ts 文件的修改,涉及别名解析和 CSS 预处理器选项。别名解析的更改包括将区域导入路径从 @nutui/nutui-react/dist/locale/enUS 更新为 @nutui/nutui-react/dist/locale/en-US,以及将 @nutui/nutui-react-taro/dist/locales/en-US.ts 更新为 @nutui/nutui-react-taro/dist/locales/en-US。在 CSS 预处理器选项中,scss 配置新增 api 属性,设置为 'modern-compiler',并引入 silenceDeprecations 选项以抑制特定的弃用警告。

Changes

文件路径 更改摘要
vite.config.site.ts 更新别名解析路径以标准化区域名称;更新 scss 配置,新增 apisilenceDeprecations 选项;修改 additionalData 示例路径。
.github/workflows/ci.yml 调整 CI 工作流的 YAML 文件格式,统一 build 作业中各步骤的缩进。

Possibly related PRs

Suggested labels

size/L

Suggested reviewers

  • oasis-cloud

Poem

在兔子洞里忙碌的我,
配置更新真是乐无穷。
别名标准化,路径清晰,
SCSS 选项新气象,
代码如春花般绽放,
兔子欢跳,乐无边! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 07695a0 and 7fb5cc3.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.95%. Comparing base (5938da7) to head (7fb5cc3).
Report is 1 commits behind head on V3.0.

Additional details and impacted files
@@           Coverage Diff           @@
##             V3.0    #2682   +/-   ##
=======================================
  Coverage   83.95%   83.95%           
=======================================
  Files         221      221           
  Lines       17849    17849           
  Branches     2679     2679           
=======================================
  Hits        14986    14986           
  Misses       2858     2858           
  Partials        5        5           

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
vite.config.site.ts (2)

45-45: 示例路径中存在拼写错误

dclearesign 看起来是 design 的拼写错误。

建议修正为:

-// example : additionalData: `@import "./src/dclearesign/styles/variables";`
+// example : additionalData: `@import "./src/design/styles/variables";`

47-50: SCSS 配置更新解决了构建问题

  1. 使用 modern-compiler API 是一个良好的改进
  2. 通过 silenceDeprecations 抑制特定的弃用警告是解决构建失败的有效方案

但建议添加注释说明为什么需要抑制这些特定的警告,以便未来维护。

建议添加说明性注释:

 silenceDeprecations: ['import', 'global-builtin'],
+// 抑制 Sass 模块导入和全局内置函数的弃用警告,以解决 V3.0 构建失败问题
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 5938da7 and 45bf52f.

📒 Files selected for processing (1)
  • vite.config.site.ts (2 hunks)
🔇 Additional comments (1)
vite.config.site.ts (1)

24-29: 区域设置路径更新符合标准命名规范

路径从 enUS 更新为 en-US 的修改是正确的,这符合国际化路径的标准命名规范。

@Alex-huxiyang Alex-huxiyang merged commit 7515810 into V3.0 Oct 31, 2024
5 checks passed
@oasis-cloud oasis-cloud deleted the hxy/fix-build branch November 11, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant