Skip to content
tezvyn:
Menu

Explain Vue as a progressive framework and build-step differences

Source: vuejs.orgEasyHow cards are made

Tests incremental adoptability. Strong answers define progressive as layer-by-layer adoption, describe script-tag HTML enhancement, and contrast it with compiled SFC SPA toolchains. Red flag: calling Vue lightweight rather than incrementally adoptable.

What's really being asked

This question checks whether you understand architectural flexibility and the difference between a runtime-enhanced page and a compiled application. Interviewers want to see that you know Vue can start as a drop-in library and graduate to a full framework, rather than forcing an all-or-nothing decision at project kickoff. They are also listening for awareness of the build-step boundary and what features live on each side.

The full answer

Four specific points in order. First, define progressive as incrementally adoptable: you can add Vue to a single button, a whole page, or an entire SPA without rewriting everything. Second, explain the no-build workflow: load Vue via a CDN script tag, call createApp with an inline template or template strings in JavaScript, and enhance existing static HTML with declarative rendering and reactivity. Third, contrast that with a full-scale project using a build step such as Vite or the legacy Vue CLI, where you write Single-File Components, use npm package imports, get tree-shaking, compile templates ahead of time for better performance, and manage dependencies with a package manager. Fourth, mention that the same core framework scales further up to server-side rendering, static site generation, or even non-web targets like WebGL and the terminal, so the progression is genuine and not just marketing.

The mistakes people make

Calling Vue progressive only because it has a small bundle size. Saying Vue always needs Webpack, Vite, or a compiler to run. Describing the no-build version as merely a prototype toy rather than a production-valid approach. Confusing the global build with the ES modules build and not knowing which one works in a plain script tag. Claiming that without a build step you lose reactivity, which is false.

What usually comes next

When would you choose the no-build approach over a Vite project? How does Vue's reactivity system work in a script-tag setup? Can you use Single-File Components without a build step? How do you migrate from a CDN-enhanced page to a compiled SPA incrementally? What are the performance trade-offs between runtime template compilation and pre-compiled SFCs?

A concrete example

Imagine a legacy server-rendered Django page with a complex form. You drop in a script tag loading Vue 3 from a CDN, mount a small app on just the form div, and use v-model and reactivity to build a dynamic multi-step wizard. The rest of the page remains untouched Django HTML. Six months later, you move that component into a Vite project, convert its template string to a Single-File Component, and wire it into a Vue Router SPA while keeping the same reactive logic and component structure.

Interview question

Which approach correctly applies Vue's progressive philosophy to a legacy server-rendered page?

  • a.Selecting Vue because it has a small bundle size compared to other frameworks
  • b.Dropping in a CDN script tag to enhance one form, then migrating that component to a Vite SFC laterCorrect
  • c.Rewriting the entire site as a compiled SPA before adding Vue to a single component
  • d.Avoiding the CDN approach because Vue loses reactivity without a build step to compile templates
Why?

Vue is progressive because it supports incremental adoption, letting you enhance one element with a CDN script and later scale to a compiled SFC project. Option A is a common misconception because progressive refers to layer-by-layer adoptability, not a small bundle size.

Just read this? Test yourself on what you have been reading.

Read the original → vuejs.org

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on vue — each one lists the topics its interview covers.

See open roles