Modal works with "serve" correctly, but it doesn't after building project

Ok, I’ve solved it…

All I’ve had to do is just remove the “/” from the start of the template URL. Meh.

Thanks to this topic: