Question · Vue.js course · Module 12: Testing & Deploy

SPA routing on a server

Why does a Vue SPA require server configuration (e.g., try_files in nginx)?

Answer options

  • Because Vue does not support routing
  • Because the server must compile Vue at runtime
  • That is not true - an SPA does not require any server configuration
  • Because without it, refreshing the page at /gallery will return a 404 - the server must redirect to index.html

You can check the correct answer by solving this task in the CodeWorlds game.