I have an old Java system with multiple pages that includes a Vue dashboard component on App.vue. The issue arises when I try to use Vue on another page without wanting the dashboard to appear there as well.
After researching, I found conflicting information about how to solve this. Some suggest editing the webpack configuration and dealing with entries, while others recommend creating multiple Vue instances or apps.
Currently, I am creating a new Vue instance on main.js to export my new component with its own unique identifier for use on the other page. This means I now have two Vue instances in my main.js file.
Regarding the webpack solution, I am unsure how to call bundled components on a div without causing conflicts with existing instances.
Using multiple Vue instances may seem like a more straightforward option, but is it considered bad practice? What is the best approach to tackle this issue? Any advice would be greatly appreciated. Thank you.