ionic-team / ionic-team/ionicons

bug: Incomplete export causes bundler error with Ionic Framework

Offen
#1,458 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
triage
Vorherrschende Sprache
TypeScript
Sterne
18.2k
Forks
2.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### 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_

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduce the Vite build using Ionicons 8.x with Ionic Framework 8.6.1, then inspect packages/vue/src/components/IonIcon.ts and the Ionicons package.json exports. Determine whether the missing ./components/ion-icon.js entry belongs in Ionicons exports or requires changing the Ionic Framework import; done when the bundler build succeeds.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript, vite
Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.