ionic-team / ionic-team/ionic-framework

bug: warnings when compiling Ionic css with lightningcss - ionic outputs deprecated host-context pseudo-class

未关闭
#30,024 6 条评论 7 个 reaction 已指派 0 人 在 GitHub 查看
package: core type: bug
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 14 小时
30 天内合并 PR
50

描述

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

When I compile Ionic Framework's css with lightningcss, I see the following error multiple times:

```
'host-context' is not recognized as a valid pseudo-class. Did you mean '::host-context' (pseudo-element) or is this a typo?
```

### Expected Behavior

No warnings

### Steps to Reproduce

1. Go to https://stackblitz.com/edit/meehep-hzppdu?file=vite.config.js
2. In console, `npm run build`
3. See warnings

### Code Reproduction URL

https://stackblitz.com/edit/meehep-hzppdu?file=vite.config.js

### Ionic Info

Latest stackblitz

### Additional Information

_No response_

贡献指南

打开贡献指南

调研方向

从链接的 StackBlitz 复现项目及其 vite.config.js 开始,然后运行 npm run build 以复现这些警告。跟踪 Ionic 的 CSS 在何处编译,并确认构建完成时不会出现关于已弃用的 host-context 伪类的警告。

由索引模型根据 Issue 内容生成。

评估

技术栈
css
领域
build-system, frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。