How does vue take on the preview page?

I use the prerender-spa plugin and it works great! I'm curious how vue can detect interruption. Why is he not trying to display his components as usual?

I tried to find the answers, but no one discusses how vue does this.

+5
source share
1 answer

As far as I know, Javascript runs as usual and displays the components. But this page shows the conclusion already made. So this is basically HTML by default if the user does not have JS. After JS analysis, the DOM (or application root div ) is freed, and application components are displayed as usual.

The pre-filled output (HTML) does not contain CSS and images, but since these pieces are loaded on your page (I hope quickly and successfully), everything is decorated in style and beautiful, ready to view.

0
source

Source: https://habr.com/ru/post/1273161/


All Articles