Is it possible to get cosmos to only build the components it needs? #1541
Replies: 3 comments
-
I'd like to figure this out, too. Unfortunataly, as mentioned in the docs, Next.js doesn't seem to have an API for interacting with it as a dev tool. I've tried to reach out to the Next.js community on Twitter and their Discord but no luck. If anyone has ideas for how to essentially build a single page/segment from a Next.js app I'd love to hear them. I can definitely help make the process smooth on the Cosmos side but at the moment Next.js is kind of a black box. |
Beta Was this translation helpful? Give feedback.
-
Hi again. We really liked react-cosmos so we tried to get it to run in a way to satisfy our needs with our NextJS app. What we needed was to have a self-contained instance of cosmos running independently capable of static independent deployment outside the app without the need to
Now, We have also created an repo example for our solution: Thanks |
Beta Was this translation helpful? Give feedback.
-
@akramscorado That's awesome, thanks for creating the example repo! Feel free to add a link to it in the Next.js docs. |
Beta Was this translation helpful? Give feedback.
-
We are considering using cosmos with our
next.js
app and it seems to works well in thedevelopment environment
. However, to get it to build statically it requires thewhole app
to be built and exported (as the docs suggest).What we need, is for cosmos to statically build only the components it needs and export them in a separate folder. Is that possible?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions