-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
feat: support browsersList #12874
base: master
Are you sure you want to change the base?
feat: support browsersList #12874
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Size Change: +314 B (0%) Total Size: 9.95 MB
ℹ️ View Unchanged
|
@@ -1477,6 +1477,8 @@ import SmileUrl, { ReactComponent as SvgSmile } from './smile.svg'; | |||
- 默认值:`{ chrome: 80 }` | |||
|
|||
配置需要兼容的浏览器最低版本。Umi 会根据这个自定引入 polyfill、配置 autoprefixer 和做语法转换等。 | |||
注意:如果`package.json` 中存在 `browsersList`, 或存在 `browsersList` 配置文件, `target` 设置默认失效. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个会比较奇怪,用户不知道为啥 target 就不生效了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
会同时在控制台 warning.
这个是考虑遵循社区约定, 并且把 browsersList
置为优先级最高.
并且 umi4
targets
配置由于历史原因, 本来就是不生效的, 这是一个bug
, 但是目前还未修复, 会影响到现有项目.
if (!browsersListConfig) { | ||
options.targets = userConfig.targets; | ||
} else if (userConfig.targets) { | ||
warn('检测到项目中存在browsersList配置, targets 配置已失效'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warn('检测到项目中存在browsersList配置, targets 配置已失效'); | |
warn('检测到项目中存在 browsersList 配置,targets 配置已失效'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
英文的是不是比较好?
@@ -1477,6 +1477,8 @@ import SmileUrl, { ReactComponent as SvgSmile } from './smile.svg'; | |||
- 默认值:`{ chrome: 80 }` | |||
|
|||
配置需要兼容的浏览器最低版本。Umi 会根据这个自定引入 polyfill、配置 autoprefixer 和做语法转换等。 | |||
注意:如果`package.json` 中存在 `browsersList`, 或存在 `browsersList` 配置文件, `target` 设置默认失效. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注意:如果`package.json` 中存在 `browsersList`, 或存在 `browsersList` 配置文件, `target` 设置默认失效. | |
注意:如果`package.json` 中存在 `browserslist` 属性,或存在 `browserslist` 配置文件,`target` 设置默认失效. |
browsersList => browserslist,L 应该是小写 |
No description provided.