ionic-team / ionic-team/ionicons

bug: Incomplete export causes bundler error with Ionic Framework

Aperta
#1,458 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
triage
Lingua principale
TypeScript
Stelle
18.2k
Fork
2.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Current Behavior

In the source file [`packages/vue/src/components/IonIcon.ts`](https://github.com/ionic-team/ionic-framework/blob/d52b253fa0903441fb36e147f2f5b90ccb538de9/packages/vue/src/components/IonIcon.ts#L4) for Ionic framework, there is an import

```
import { defineCustomElement } from "ionicons/components/ion-icon.js";
```

that is not provided in the `exports` of [`package.json`](https://github.com/ionic-team/ionicons/blob/a9556e4901e7004ce4c11a3754569a3942d1ef54/package.json) for **Ionicons**, and this causes bundler problems. I am not able to build with Vite and Ionicons 8.x, and narrowed it to the partial export.

```
Missing "./components/ion-icon.js" specifier in "ionicons" package [plugin vite:dep-pre-bundle]
```

Is this an Ionicons problem, or an Ionic Framework problem?

### Expected Behavior

Ability to build with a bundler.

### Steps to Reproduce

Use Ionicons 8.x with Ionic Framework 8.6.1 (currently the latest) and build with Vite.

### Code Reproduction URL

_No response_

### Additional Information

_No response_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.