Some of our components are entirely reliant on being used in the browser due to their coupling with the window , document, or localStorage APIs. If we don't prevent these components from rendering on the server, we'll get all kinds of errors that aren't particularly easy to debug.
As an example, at the top of the script section in the ClientApp/components/catalogue/FilterAccordion.vue component, we are importing the Velocity library that we're using for animations:
import * as Velocity from "velocity-animate";
Velocity is one of those libraries that cannot run outside of the browser, and simply importing it like this is enough to cause our SSR to fail. This is a particularly tricky situation, as using the import syntax as we are means that any import lines have to be at the root level of the...