Deploying the various js frontends

So as you know there are those JS frontends, like Vue, React, Angular, Svelte etc…
You run a dev server and in the end compile or transpile the result to a dist dir.

Searching the web I’ve only found guides that show how to build docker images where you take the nginx image and embed the resulting dist dir into it.
But in k8s philosophy and tbh I think so that the files should be their own container and nginx should be a separate container and the backend should be a separate container.

Well my backend is written in Go and I use ko, which is a nice tool.

The dist dir smells very much like a pv or pvc, or in docker terms, a volume.

How would you go about packaging pure files without any listeners, and connect them with a nginx or other container?