I am rendering a 3rd party script tag using Gatsby's onRenderBody and setHeadComponents API in gatsby-ssr.js.
export const onRenderBody = ({ setHeadComponents }) => {
setHeadComponents([
<script
type="text/javascript"
async
key="1"
src="//www.myscripturl.com/analytics.js"
/>,
])
}
However, the HTML that is output sets the async tag as async="".
<script type="text/javascript" async="" src="//www.myscripturl.com/analytics.js"></script>
It's not clear to me if this is allowing async loading of the script or not. Typically, I'd expect the script to output as:
<script type="text/javascript" async src="//www.myscripturl.com/analytics.js"></script>