ionic-team / ionic-team/ionicons

bug: IonIcons not loading after parcel build

Open
#1,215 6 comments 0 reactions 0 assignees View on GitHub
help wanted type: bug
Dominant language
TypeScript
Stars
18.2k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

### Current Behavior

IonIcons not loading after parcel build

### Expected Behavior

Icons should load

I am using ionicons for my html. It is working fine with live server. I tried to build with parcel and now they are not loading. icons are loading in network tab but not showing up in build. Please advise. Assume body tag enclosed for html

live server
![image](https://github.com/ionic-team/ionicons/assets/99925216/7a8a1e57-4977-40ec-929b-9338e23dbb4c)

parcel build
![image](https://github.com/ionic-team/ionicons/assets/99925216/880f5bf1-5fec-4509-906f-256214ddb9ec)

console is giving this error : Uncaught SyntaxError: Cannot use import statement outside a module (at ionicons.esm.js:1:1)

sample code

.feature-icon {
color: #c92a2a;
height: 3.6rem;
width: 3.6rem;
margin-bottom: 2.4rem;
}

### Steps to Reproduce

Build with parcel with ion-icons

### Code Reproduction URL

_No response_

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.