ionicons icon indicating copy to clipboard operation
ionicons copied to clipboard

bug: Incomplete export causes bundler error with Ionic Framework

Open DinosaurDad opened this issue 9 months ago • 1 comments

Current Behavior

In the source file packages/vue/src/components/IonIcon.ts 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 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

DinosaurDad avatar Jun 13 '25 14:06 DinosaurDad

Downgrading to Ionicons 7.4.0 works, and it doesn't have an exports entry.

DinosaurDad avatar Jun 13 '25 15:06 DinosaurDad