ionic-team / ionic-team/ionic-framework

bug: ionic-core and ionicons use different stencil versions which results in bundle warning

未关闭
#29,896 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
triage
主要语言
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 building a Angular app using application bundler with esbuild I get the following warning, because ionic-core and ionicons use different stencil-core versions.

```
The import path @stencil/core/internal/app-data resolves to multiple files in the bundle:
[node_modules/.pnpm/@stencil+core@4.20.0/node_modules/@stencil/core/internal/app-data/index.js](javascript:void 0)
[node_modules/.pnpm/@stencil+core@4.21.0/node_modules/@stencil/core/internal/app-data/index.js](javascript:void 0)
The import path @stencil/core/internal/client resolves to multiple files in the bundle:
[node_modules/.pnpm/@stencil+core@4.20.0/node_modules/@stencil/core/internal/client/index.js](javascript:void 0)
[node_modules/.pnpm/@stencil+core@4.21.0/node_modules/@stencil/core/internal/client/index.js](javascript:void 0)
```

```
dependencies:
@ionic/angular 8.3.1
├─┬ @ionic/core 8.3.1
│ ├── @stencil/core 4.20.0
│ └─┬ ionicons 7.4.0
│ └── @stencil/core 4.21.0
└─┬ ionicons 7.4.0
└── @stencil/core 4.21.0
@ionic/core 8.3.1
├── @stencil/core 4.20.0
└─┬ ionicons 7.4.0
└── @stencil/core 4.21.0
ionicons 7.4.0
└── @stencil/core 4.21.0
```

### Expected Behavior

Since both are used together it would make sense they always use the same stencil versions.

### Steps to Reproduce

Install ionic and ionicons with versions above.

### Code Reproduction URL

Not required imo

### Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/marvin/.bun/install/global/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.3.1
@angular-devkit/build-angular : 18.2.6
@angular-devkit/schematics : 18.2.6
@angular/cli : 18.2.6
@ionic/angular-toolkit : not installed

Capacitor:

Capacitor CLI : 6.1.2
@capacitor/android : 6.1.2
@capacitor/core : 6.1.2
@capacitor/ios : 6.1.2

Utility:

cordova-res : not installed globally
native-run : not installed globally

System:

NodeJS : v22.7.0 (/opt/homebrew/Cellar/node/22.7.0/bin/node)
npm : 10.8.2
OS : macOS Unknown

### Additional Information

_No response_

贡献指南

打开贡献指南

调研方向

使用 @ionic/angular 8.3.1、@ionic/core 8.3.1 和 ionicons 7.4.0 重现安装过程,然后检查它们的依赖清单以及最终得到的 @stencil/core 版本。确认 Angular esbuild 构建会输出重复导入警告。当这些包使用兼容的 Stencil 版本且该警告不再出现时,即表示完成。

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

评估

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

把新 issue 发到你的邮箱

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