[front-end architecture] js is universal. Multiple sets of html+css build different front-end pages of websites, seeking optimization suggestions and appreciating them starting from 50 yuan.

as developers, we hope to provide customers (various enterprises) with multiple sets of templates for official websites.
there is no seo requirement, so the front and back end separation architecture is used.

at present, the ways I can think of are:
1, as a traditional website development, general js files are manually copied and pasted, a set of templates a folder.
disadvantages: develop phase: general js requirements change, contents of all folders need to be changed manually; deploy to production environment: each folder is built independently, taking up a lot of construction resources and spending construction time

2, as a website development, all components of different templates are packaged into static resources to switch different site resources through vue dynamic routing. I also heard that this method can be realized. Suppose there are 100 sets of templates, when we show one of them, can we dynamically load one of them?

Aug.17,2021

  1. General JS files directly read network resources, and directly maintain a set of network resources during later maintenance.
  2. load on demand according to the route.
Menu