I can confirm it works on my staging & production server.
My local install is from 10Up, https://10up.github.io/wp-local-docker-docs/, and it’s a fairly standard WordPress docker setup (and matches WP’s suggested NGINX settings). If the issue is with “pretty permalinks”, then it suggests an issue with locally hosted NGINX (as I’ve noticed this seems to be fairly different to Apache), so I did some digging…
The issue is in /blocks/index.php.
$wp_post = get_post(
url_to_postid("https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']),
'_wpg_def_keyword',
true
);
I’m not a server expert, but as far as I can tell it should be,
$wp_post = get_post(
url_to_postid("https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']),
'_wpg_def_keyword',
true
);
to work correctly with NGINX localhost.
I read a bit of PHP docs and learnt SERVER_NAME will return the spoofed hostname by default under Apache2 unless spoofing is specifically turned off, which is probably why is works for some people, while NGINX returns ‘localhost’ instead of the hostfile domain name (and therefore wp_post returns a post ID of 0 and unsets the JS file).
Making that change fixed my issues. I tested on a live site as well with no problems.