-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Babel Optimization Error: Module Size Exceeding 500KB #61
Comments
Hi @0-don thanks for sharing, solid-start receive new updates recently, i will check this and go back with update soon. |
In dev mode, Babel shows the error as above. However, when I built it, app works well. I think 'tree shake' function solved this issue during the build process. Am I right? |
Just noticed the same issue here in a personal proj. |
same hare |
The one fa index file is over 2k lines and they all look like this: export declare const FaSolidY: IconTypes;
export declare const FaSolidYenSign: IconTypes;
export declare const FaSolidYinYang: IconTypes;
export declare const FaSolidZ: IconTypes; There is no way to import one of these. Perhaps all these icons need separate files, but that is a pretty rough way to fix the issue. I think the code generator is going to need to be a bit smarter. |
I agree, in fact I've been iterating recently on how to make icon generation more optimized, going for files separated by icons and their types sounds the most reasonable, I remember that I decided to export the types of each icon name in that way because that way VSCode suggested the names automatically. It's possible that the reason for doing it that way is that it's not logical for the library's operation. |
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.js
andsolid-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-icons
package 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-icons
that could avoid this problem?Additional Context
The text was updated successfully, but these errors were encountered: