Description
When building a SolidJS project using solid-icons, Babel throws an optimization error indicating that the styling of some modules exceeds the maximum size of 500KB. This is occurring specifically with solid-icons/fa/index.js and solid-icons/tb/index.js. The error message is repeated multiple times, suggesting that the issue persists through multiple attempts to compile.
Steps to Reproduce
- Set up a SolidJS project with
@solidjs/start.
- Include the
solid-icons package in the dependencies.
- Run the build script.
Expected Behavior
The build should complete without errors, and Babel should handle the module size appropriately, possibly by splitting or tree-shaking.
Actual Behavior
The following error is received:
[BABEL] Note: The code generator has deoptimised the styling of /home/don/MEGA/Projects/coding.global-web/node_modules/solid-icons/tb/index.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /home/don/MEGA/Projects/coding.global-web/node_modules/solid-icons/fa/index.js as it exceeds the max of 500KB.
Environment
- SolidJS Version: 1.8.15
- Solid Icons Version: 1.1.0
- Node Version: 20
- Package Manager: [yarn]
- Operating System: [Linux]
Possible Solution
Could this be an issue with how the icons are being imported or bundled? Is there a recommended way to import solid-icons that could avoid this problem?
Additional Context

Description
When building a SolidJS project using
solid-icons, Babel throws an optimization error indicating that the styling of some modules exceeds the maximum size of 500KB. This is occurring specifically withsolid-icons/fa/index.jsandsolid-icons/tb/index.js. The error message is repeated multiple times, suggesting that the issue persists through multiple attempts to compile.Steps to Reproduce
@solidjs/start.solid-iconspackage in the dependencies.Expected Behavior
The build should complete without errors, and Babel should handle the module size appropriately, possibly by splitting or tree-shaking.
Actual Behavior
The following error is received:
Environment
Possible Solution
Could this be an issue with how the icons are being imported or bundled? Is there a recommended way to import
solid-iconsthat could avoid this problem?Additional Context