I have built a next.js application with some bare minimum functionality that includes:
- Middleware for authentication
- Protected file serving api routes
- Logging for error handling
Now I want to publish this as an npm module and allow other teams to build their own pages/views on top of this. How to bundle and publish this next.js application as a library?