Primeicons not working on Server with no internet

525 Views Asked by At

I am trying to use primeicons in my react app and icons are getting loaded successfully on local environment, however while deployment on server, where there is no internet, icons are not getting loaded.

import '../../node_modules/primeicons/primeicons.css'
    
<button title="Repurchase"
                style={{ borderRadius: '50%', fontSize: '0.8rem', backgroundColor: '#293189', color: 'white' }}
                onClick={() => this.purchase(rowData)}>
                <i style={{ marginTop: '5px' }} class="pi pi-download"></i>
              </button>

Please refer attached image. Can you please helpenter image description here

1

There are 1 best solutions below

2
Melloware On

Don't import from ../../node_modules/primeicons/primeicons.css your import should just be...

import 'primeicons/primeicons.css';