Modern Mode and Static Content Optimization
Explore how to optimize Vue applications with Modern Mode by creating separate builds for modern and legacy browsers, reducing bundle sizes and improving loading times. Understand how to use the v-once directive to render static content only once, enhancing performance during component rendering.
We'll cover the following...
Many modern Vue applications are scaffolded using Vue-CLI, which internally uses Babel to transpile code to a format. Legacy browsers understand that. On the one hand, this is a great feature, as applications work in legacy browsers, while we developers can write modern JavaScript code and use the newest features that came out recently. On the other hand, modern browsers that are actually used by most users also receive the transpiled code to run. This means that even though ...