Currently, I am in the process of developing two distinct web applications using svelte/typescript:
- Site A, which serves as the public-facing front end and must be optimized for speed and efficiency
- Site B, the administration UI where editors manage and update the content displayed on Site A
My goal is to utilize the same "view component" from Site A in the editor interface of Site B, while incorporating editor-specific logic to create a seamless WYSIWYG experience without duplicating code.
One option is to merge Site A and Site B into a single svelte application; however, I am concerned about the additional modules and code required for Site B negatively impacting the performance of Site A.
How can I structure my design to avoid code redundancy while ensuring that Site B's logic remains isolated from Site A?