How do I use resource bundles AND uglyURLs?

I am trying to use resource bundles PLUS uglyURLs, but the result is very wonky:

pages that are NOT in a bundle, correctly generate with the .html

mywebsite.com/somecategory/somepage.html

but pages that ARE in a bundle, generate this:

mywebsite.com/somecategory/somepage/

I expected it to maybe generate this:

mywebsite.com/somecategory/somepage/index.html

but it doesn’t.

So how I get the leaf bundles to respect uglyURLs and generate with .html instead of / ?

Still want an answer for this but found this hacky way of doing it:

on config file:
[permalinks]
produtos = “:sections/:filename”

then I needed to create a _index.md file on each subsection otherwise it would not show the subsections on the final URL.