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'm facing an issue with bundling my React library using Tsup, specifically when trying to support server components. The previous configuration bundled everything into one file, which caused conflicts with components that needed to be loaded as server components.
I'm attempting to bundle each component separately and use a barrel index file to gather them, applying the 'use client' directive only where necessary. However, this new configuration is resulting in a ERR_WORKER_OUT_OF_MEMORY error.
this is the ISSUE FROM GITHUB my LIbrary If you want to suggest some help or contribute
@pillar-ui/core:dev: Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory
Goals
Bundle each component separately.
Add the "use client" directive to the components that require it.
I'm developing an open-source UI library, and I'm aiming to ensure it seamlessly supports the 'use client' directive by default this is the link of the issue in github for more info Pillar ui.
Any help in resolving this issue or suggestions for improving the bundling configuration would be greatly appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm facing an issue with bundling my React library using Tsup, specifically when trying to support server components. The previous configuration bundled everything into one file, which caused conflicts with components that needed to be loaded as server components.
I'm attempting to bundle each component separately and use a barrel index file to gather them, applying the
'use client'
directive only where necessary. However, this new configuration is resulting in aERR_WORKER_OUT_OF_MEMORY
error.this is the ISSUE FROM GITHUB my LIbrary If you want to suggest some help or contribute
Previous Tsup Configuration
New Tsup Configuration
Error
Goals
"use client"
directive to the components that require it.I'm developing an open-source UI library, and I'm aiming to ensure it seamlessly supports the 'use client' directive by default this is the link of the issue in github for more info Pillar ui.
Any help in resolving this issue or suggestions for improving the bundling configuration would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions