Skip to content

fix: restore browser targets#165

Merged
zombieJ merged 1 commit into
react-component:masterfrom
QDyanbing:fix-targets
Jun 9, 2026
Merged

fix: restore browser targets#165
zombieJ merged 1 commit into
react-component:masterfrom
QDyanbing:fix-targets

Conversation

@QDyanbing

@QDyanbing QDyanbing commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Restore the browser compile target to the previous Father default while keeping @rc-component/father-plugin enabled.
  • Prevent private class fields from leaking into the published es and lib output.

Root Cause

@rc-component/father-plugin@2.2.0 defaults targets to { chrome: 85 }, which is newer than the previous Father browser default. As a result, the published qrcode output kept static #_ private fields in qrcodegen.js, and older webpack parsers failed with Unexpected character #.

Verification

  • npm run compile
  • acorn@6 parses es/libs/qrcodegen.js and lib/libs/qrcodegen.js after the fix
  • npm test -- --runInBand

Fixes #164

Summary by CodeRabbit

  • 改进
    • 增加了对Internet Explorer 11的浏览器支持

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 68d016c3-74ad-49dd-a9e9-65a11ef725b4

📥 Commits

Reviewing files that changed from the base of the PR and between 0da7d0b and 383225f.

📒 Files selected for processing (1)
  • .fatherrc.js

概览

.fatherrc.js 中的 Father 构建配置内添加了 targets 选项,指定 IE 11 作为编译目标版本,以确保生成的代码与该浏览器版本兼容。

变更

构建工具目标配置

Layer / File(s) 概述
IE 11 目标版本配置
`.fatherrc.js`
defineConfig 中新增 targets: { ie: 11 } 字段,指定 Father 构建工具的浏览器版本兼容性目标。

预计代码审查工作量

🎯 1 (微小) | ⏱️ ~3 分钟

小兔子配置笔,IE 11 现身
构建目标已明确,webpack 兼容性真
三行代码解顾虑,版本不再隔阂深 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR标题准确反映了主要变更:恢复浏览器编译目标配置为IE 11,这与.fatherrc.js文件添加targets配置的改动直接相关。
Linked Issues check ✅ Passed 代码变更通过在.fatherrc.js中添加targets配置,实现了恢复浏览器编译目标的目标,解决了#164中webpack兼容性问题。
Out of Scope Changes check ✅ Passed 所有代码变更都在scope内,仅涉及.fatherrc.js配置文件的targets字段更新,与恢复浏览器目标的目标相符。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the .fatherrc.js configuration file to target Internet Explorer 11 (ie: 11). There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@QDyanbing QDyanbing marked this pull request as ready for review June 9, 2026 10:40
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.08%. Comparing base (0da7d0b) to head (383225f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #165   +/-   ##
=======================================
  Coverage   80.08%   80.08%           
=======================================
  Files           6        6           
  Lines         673      673           
  Branches      166      166           
=======================================
  Hits          539      539           
  Misses        134      134           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread .fatherrc.js
plugins: ['@rc-component/father-plugin'],
targets: {
ie: 11,
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这个太低了,antd v6 不是这个 target。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

这个是#164 最近升级了 @rc-component/father-plugin;的2.x版本的问题;

@zombieJ zombieJ merged commit 9714273 into react-component:master Jun 9, 2026
7 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.

Version 1.1.2 contains a breaking change, which is currently causing errors when running webpack.

3 participants