Hi,
I notice that the filter add_attributes_to_script() doesn't work because script tag has not the type attribute anymore in Wordpress, or almost in mine Wordpress with default theme TwentyTwenty and without any plugin. I see that this filter replace type="text/javascript" with type="module".
I solved by using below solution, which also add integrity:
Hi, I notice that the filter
add_attributes_to_script()
doesn't work because script tag has not the type attribute anymore in Wordpress, or almost in mine Wordpress with default theme TwentyTwenty and without any plugin. I see that this filter replace type="text/javascript" with type="module".I solved by using below solution, which also add integrity: