I have a Vue project where I dynamically load an App based on the subdomain. In
src/main.js I parse out the subdomain, which can be either www(App1) or a wildcard(App2). In the case of the wildcard, I send it to the server to be validated. Once I’ve determined which App to run, I pass in the App and corresponding Router to initialize.
This works perfectly fine, but what ends up happening is that Webpack creates bundles for all my dynamic components in each Router1 and Router2 and there is cross-over. When App1 is running, bundles from App2’s components are being injected as html prefetch.
Is there any way to keep these bundles from being injected into their non-corresponding App while keeping prefetch, or is my only option simply to disable prefetch and have all my components dynamic and have them fetched on demand?