Selection of vue single page and multiple pages in the project

recently contacted vue, to use vue to make a similar style website (as shown below), and the actual demand is estimated to be 20 + pages visually. Can a single page be satisfied?

clipboard.png

  • because I haven"t used vue, I worry that when using a single page, the page, configuration, and other things will be too redundant, and will the compiled page be huge (slow to load? ), will there be a pit?
  • if you use multiple pages, is it not good for common areas to be compiled, loaded, and rendered over and over again?

can partners with development experience share their experiences?


multiple pages are multiple entries for webpack, and each entry can be seen as a single page.
personally think that the structure and content are similar, and those with high relevance can be done in an entry, and then use router to maintain different content, while irrelevant ones can open another page
simply say:

a.html-> a.html sharsharprouterA1, a.html-sharprouterA2
b.html-> b.htmlMursharprouterB1, b.html-sharprouterB2

you can take a look at this example


recent contact. This is a little awkward. More pages are better, I think. Because if you expand later, it will be more convenient.

on a single page, state management is not suitable for people to contact, including some ways to introduce resources. All need to be considered


I think a single page is enough, and the experience is better. Many resources are shared, and multiple pages waste requests


not a single page, not a single page. Not a single page! Say the important thing three times


20 + pages can use a single page, multiple pages per page does not seem to have much to do with the number of pages. In theory, all websites can be implemented with a single page


actually does not have much to do with the number of pages, mainly depends on the complexity of the page structure. Generally, you need to do multi-page applications, especially your data list. There may be tens of thousands of data to be displayed in the future, and if multiple similar requirements are completed on a single page, you can imagine the rendering speed and response speed.


if you are just beginning to learn
, it is not recommended to directly use it to do a project, you can write something to practice by yourself first
if you don't realize something later, you will find that you have buried too many holes in front


recommended single page
too many dependent libraries? Demand loading, Tree Shaking, extraction common library
page loading time too long? Prerender, asynchronous component loading
requires seo and first screen rendering time? SSR


single page loads slowly for the first time, but later loading advantages outweigh multiple pages. On the other hand, multiple pages load quickly for the first time, but they have to be loaded every time later.
vue is more suitable for a single page, you can configure webpack to do multiple pages, but this will lose the advantage of vue.
it is recommended that you use vue as a single page if you don't need to think too much about compatibility. Such as their own background management system or something.
if you want to be compatible with ie8 or something. Or think about it.


you can see that https://codeshelper.com/a/11.


multiple pages have the advantages of multiple pages, and a single page has the advantage of a single page. From seo crawler, I am more inclined to multiple pages. For a single page, there is only index.html, and no related content, only one line of code. If you open multiple pages, you will find that all the data will be displayed, so using seo, depends on what your product tends to do

Menu