Vue · Senior · Question 18 of 75
What does the runtime-only build of Vue lack, and why is it the default with Vite?
- ✓Correct answer: The template compiler - SFC templates are precompiled at build time, so shipping the compiler only adds weight
- 2Reactivity - it must be added separately
- 3Component support - only render functions work
Explanation
You only need the full build when compiling templates in the browser at runtime (e.g. from strings in HTML). That is also a security risk with user content.