However, I don’t know the correct (generic) way to generate a path (URL) to static html for that.
In the following two cases, the path where the extension static resource is placed is different, and if I choose one of them, one will result in 404 not Found.
There’s a lot of information in the cross-posted issue… looks like there are some more cross-posted threads here. Please try to consolidate your inquiry, and actually try some of the approaches recommended instead of just making more issues and posts.