The official HubSpot plugin for WordPress (https://wordpress.org/plugins/leadin/) has a bug which is breaking the official PWA plugin for WordPress (https://wordpress.org/plugins/pwa/) and potentially other plugins. This is being caused by the fact that the HubSpot plugin is outputting code via hooks that don't expect any direct output (even then, it's CSS & JS instead of HTML).
Simply changing what this plugin is hooking into to be more fitting given WordPress' conventions fixes the issue (outputs the tracking code HTML just before </body> on the public & login pages using `login_footer` and `wp_footer` instead of `login_enqueue_scripts` and `wp_enqueue_scripts`, respectively).
Proposed Bugfix for WordPress Plugin: PWA Service Worker Having HTML Inserted Into JavaScript
SOLVE
I'd be curious to know the status of this being adopted as part of an official plugin update.
I've patched of the plugin on my site, but I don't want it to break by updating to a new release of this plugin that doesn't include the fix. Also, this really should be fixed for others using this plugin as well.