[Solved] SPA deployment after production go live
-
Dear
As you know when build SPA project, the build result are all in the folders (E.g. css, fonts, js, statics) and the file index.html. After production go live, if there is one bug A in file A.vue which is reported by customer A and there is another bug B in file B.vue which is reported by customer B. How do I deploy hotfix A (which only fix bug A) to customer A and deploy hotfix B (which only fix bug B ) to customer B?
I am not sure if it can be done because all the vue files are built in a bundle. But it can be done in Java project, for example, we can compile A.java file to A.class and B.java to B.class. Then we can deploy them respectively.
This topic is related to Vue, but would appreciate if you have some idea, thanks!
-
@Stanley well if you deployed java browser apps, in old times, you also bundled them into .jar files.
I think the thinking about SPA deployment is somewhat different than thinking about java app deployment. For example, with java desktop apps your best cache layer is some kind of ssd storage. In SPA you have local browser cache (also preferably on ssd storage, you have intermediate cache for example in your cdn or hosting provider, you should have also cache layer at the reverse proxy level (before app server) and you have unspecified multiple cache layers in your api/backend/server side. With SPA you optimize not for single component but for entire specific cache layer. Thats why we use bundling, tree shaking, preloading etc.
You also wrote about another scenario: single project, two code versions for different customers. There are multiple solutions, but one, the most valid and typical is just use git with different release branches for your clients.
-
@qyloxe I got your point. Thank you!