You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue with the solar-icon-set package when attempting to import individual icons. According to the expected usage, we should be able to import icons individually like this:
import { SidebarMinimalistic } from 'solar-icon-set/dist/icons/networkitprogramming/SidebarMinimalistic';
However, this import statement results in the entire networkitprogramming folder being included in the bundle, which significantly increases the bundle size and negatively impacts performance.
Problem:
Even when I try to import a specific icon as shown above, the entire folder is imported instead of just the single icon. This makes it impossible to use the package efficiently in projects where optimization and minimal bundle size are critical.
Expected Behavior:
The expected behavior is to import only the specified icon, without including all the icons in the same folder.
Actual Behavior:
The actual behavior is that the import statement includes all the icons from the networkitprogramming folder, not just the SidebarMinimalistic icon. This results in unnecessary code being bundled and sent to the client.
Proposed Solution:
Update the exports field in the package.json to allow for precise, individual icon imports without including the entire folder. For example:
This change would greatly improve the usability and efficiency of the solar-icon-set package, allowing developers to import only the components they need. Thank you for considering this request!
The text was updated successfully, but these errors were encountered:
Hello,
I am encountering an issue with the
solar-icon-set
package when attempting to import individual icons. According to the expected usage, we should be able to import icons individually like this:import { SidebarMinimalistic } from 'solar-icon-set/dist/icons/networkitprogramming/SidebarMinimalistic';
However, this import statement results in the entire networkitprogramming folder being included in the bundle, which significantly increases the bundle size and negatively impacts performance.
Problem:
Even when I try to import a specific icon as shown above, the entire folder is imported instead of just the single icon. This makes it impossible to use the package efficiently in projects where optimization and minimal bundle size are critical.
Expected Behavior:
The expected behavior is to import only the specified icon, without including all the icons in the same folder.
Actual Behavior:
The actual behavior is that the import statement includes all the icons from the networkitprogramming folder, not just the SidebarMinimalistic icon. This results in unnecessary code being bundled and sent to the client.
Proposed Solution:
Update the exports field in the package.json to allow for precise, individual icon imports without including the entire folder. For example:
"exports": { "./files/*": "./dist/icons/Files/*", "./networkitprogramming/*": "./dist/icons/NetworkItProgramming/*", "./videoaudiosound/*": "./dist/icons/VideoAudioSound/*", ... }
This change would greatly improve the usability and efficiency of the solar-icon-set package, allowing developers to import only the components they need. Thank you for considering this request!
The text was updated successfully, but these errors were encountered: