I have a cross-platform app which will be also deployed into web, using Next.js and Capacitor.
Two platforms(Web/App) are sharing some assets and codes and it will be more in the future, so I ended up deciding to keep this system. But the problem is sometimes I need to organize them by its purposes.
I know there's two way to group dependencies by prod and dev, but it wouldn't work for my case. I want to split them like dependencies for the web, app, and maybe shared(global) one to speed up build process for each deployment.
Or I would say I just want to omit app-specific dependencies like @capacitor/... while deploying web part.
Do you have any idea for this? Or should I just pick up another strategy for this case?
Appreciate your thoughts in advance!