Vue SSR / Vue-Router always rebuilds server [SOLVED]

I hadn’t noticed this before, but you’re right! I think it’s to do with the router - even routes which use dynamic import seem to trigger server re-builds.

Here’s what I tried to figure that out:

  • Edit client/main.js - the client refreshes but the server doesn’t get re-built, as expected.
  • Edit imports/ui/EditTeam.vue - this file is not included in any SSR, BUT the server is re-built!!
  • Remove the dynamically imported route from routes.js:
// { path: '/admin/team/:teamId', component: () => import('./EditTeam.vue'), props: true, meta: {auth: 'teamAdmin'}},
  • Edit imports/ui/EditTeam.vue again - server NOT rebuilt - success!