Importing one app's next js bundle files into another next js app

Viewed 53

I have two different next js applications which serves different sets of routes. I have another custom next js server which is responsible for sourcing the desired page based on the page requested.

I would like to serve the pages through the custom server as a platform. can i import the next js bundles from the two applications and serve them through the custom server? How can i achieve this use case using next js?

1 Answers

You can package some of your components as NPM packages and install them into you main app. This should also save your response time during loading. You can find tutorials on how to do this on YouTube.

Related