Creating ui library - how to deal with server/client stuff with one bundle file.
Answered
Pacific anchoveta posted this in #help-forum
Pacific anchovetaOP
Hi, I am creating yet another ui library for react and I have simple function that can be run anywhere, but this time I want to run it on the server. Since it is in one bundle it does import all the stuff. How do I fix such stuff? Should I move server compatible components and functions to "@package/react/server" or something?
2 Replies
yeah you need two bundles
Answer
Pacific anchovetaOP
okay thank you