I'm facing a challenge in my projects due to architectural changes and am in need of some guidance to move forward. Here is the issue at hand.
Situation Originally, I began with a single Vue application that included various components such as querying, visualizations, CRUD, and more. The querying component itself consists of multiple independent elements, primarily forms. Subsequently, I initiated another project with a completely different purpose, but it also requires the functionality of the querying component. As a result, I integrated the querying components into this new project as well.
Current Status While everything is functioning correctly at the moment, managing updates/changes to the querying components in these two separate projects has become quite chaotic. Therefore, I am contemplating transforming the querying component into a standalone tool/package that can be incorporated into both projects. This adjustment would streamline the code management process for me, as I would only need to modify a single codebase.
Issue The primary complication lies in the querying component, which I aim to extract, heavily relying on centralized state management through Vuex by utilizing its mutations, actions, and getters. I have come across numerous tutorials and blogs detailing how to create a single Vue component as an npm package. However, my scenario differs slightly. As previously mentioned, I have a multitude of components (linked to Vuex mutations and actions) within the Querying component. Consequently, I am uncertain about the procedure for separating Querying along with its own Vuex store and then integrating it into an application alongside the respective Vuex Store.
This will be my first time creating a node package, and it's possible that what I find difficult may actually be quite straightforward and fundamental; therefore, I appreciate your understanding regarding my limited knowledge in this field.
Any assistance or suggestions you can provide would be greatly valued.